aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/audiocd/audiocd.h5
-rw-r--r--backends/audiocd/default/default-audiocd.cpp3
-rw-r--r--backends/audiocd/default/default-audiocd.h3
-rw-r--r--backends/audiocd/sdl/sdl-audiocd.cpp4
-rw-r--r--backends/audiocd/sdl/sdl-audiocd.h3
-rw-r--r--backends/base-backend.cpp4
-rw-r--r--backends/base-backend.h3
-rw-r--r--backends/events/default/default-events.cpp3
-rw-r--r--backends/events/default/default-events.h7
-rw-r--r--backends/events/dinguxsdl/dinguxsdl-events.cpp3
-rw-r--r--backends/events/dinguxsdl/dinguxsdl-events.h3
-rw-r--r--backends/events/gp2xsdl/gp2xsdl-events.cpp11
-rw-r--r--backends/events/gp2xsdl/gp2xsdl-events.h3
-rw-r--r--backends/events/gph/gph-events.cpp42
-rw-r--r--backends/events/linuxmotosdl/linuxmotosdl-events.cpp3
-rw-r--r--backends/events/linuxmotosdl/linuxmotosdl-events.h3
-rw-r--r--backends/events/openpandora/op-events.h2
-rw-r--r--backends/events/samsungtvsdl/samsungtvsdl-events.cpp3
-rw-r--r--backends/events/samsungtvsdl/samsungtvsdl-events.h3
-rw-r--r--backends/events/sdl/sdl-events.cpp12
-rw-r--r--backends/events/sdl/sdl-events.h3
-rw-r--r--backends/events/symbiansdl/symbiansdl-events.cpp3
-rw-r--r--backends/events/symbiansdl/symbiansdl-events.h3
-rw-r--r--backends/events/webossdl/webossdl-events.cpp248
-rw-r--r--backends/events/webossdl/webossdl-events.h41
-rw-r--r--backends/events/wincesdl/wincesdl-events.cpp3
-rw-r--r--backends/events/wincesdl/wincesdl-events.h3
-rw-r--r--backends/fs/abstract-fs.cpp3
-rw-r--r--backends/fs/abstract-fs.h3
-rw-r--r--backends/fs/amigaos4/amigaos4-fs-factory.cpp6
-rw-r--r--backends/fs/amigaos4/amigaos4-fs-factory.h3
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp92
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.h110
-rw-r--r--backends/fs/ds/ds-fs-factory.cpp3
-rw-r--r--backends/fs/ds/ds-fs-factory.h3
-rw-r--r--backends/fs/ds/ds-fs.cpp3
-rw-r--r--backends/fs/ds/ds-fs.h3
-rw-r--r--backends/fs/fs-factory.h3
-rw-r--r--backends/fs/n64/n64-fs-factory.cpp6
-rw-r--r--backends/fs/n64/n64-fs-factory.h4
-rw-r--r--backends/fs/n64/n64-fs.cpp55
-rw-r--r--backends/fs/n64/n64-fs.h77
-rw-r--r--backends/fs/posix/posix-fs-factory.cpp14
-rw-r--r--backends/fs/posix/posix-fs-factory.h3
-rw-r--r--backends/fs/posix/posix-fs.cpp18
-rw-r--r--backends/fs/posix/posix-fs.h5
-rw-r--r--backends/fs/ps2/ps2-fs-factory.cpp6
-rw-r--r--backends/fs/ps2/ps2-fs-factory.h6
-rw-r--r--backends/fs/ps2/ps2-fs.cpp93
-rw-r--r--backends/fs/ps2/ps2-fs.h102
-rw-r--r--backends/fs/psp/psp-fs-factory.cpp28
-rw-r--r--backends/fs/psp/psp-fs-factory.h3
-rw-r--r--backends/fs/psp/psp-fs.cpp71
-rw-r--r--backends/fs/psp/psp-fs.h69
-rw-r--r--backends/fs/psp/psp-stream.cpp3
-rw-r--r--backends/fs/psp/psp-stream.h3
-rw-r--r--backends/fs/stdiostream.cpp3
-rw-r--r--backends/fs/stdiostream.h3
-rw-r--r--backends/fs/symbian/symbian-fs-factory.cpp5
-rw-r--r--backends/fs/symbian/symbian-fs-factory.h3
-rw-r--r--backends/fs/symbian/symbian-fs.cpp139
-rw-r--r--backends/fs/symbian/symbian-fs.h70
-rw-r--r--backends/fs/symbian/symbianstream.cpp3
-rw-r--r--backends/fs/symbian/symbianstream.h3
-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.h73
-rw-r--r--backends/fs/windows/windows-fs-factory.cpp9
-rw-r--r--backends/fs/windows/windows-fs-factory.h3
-rw-r--r--backends/fs/windows/windows-fs.cpp116
-rw-r--r--backends/fs/windows/windows-fs.h120
-rw-r--r--backends/graphics/default-palette.h3
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp10
-rw-r--r--backends/graphics/dinguxsdl/dinguxsdl-graphics.h3
-rw-r--r--backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp5
-rw-r--r--backends/graphics/gp2xsdl/gp2xsdl-graphics.h3
-rw-r--r--backends/graphics/gph/gph-graphics.cpp9
-rw-r--r--backends/graphics/graphics.h3
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp10
-rw-r--r--backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h3
-rw-r--r--backends/graphics/null/null-graphics.h3
-rw-r--r--backends/graphics/opengl/glerrorcheck.cpp3
-rw-r--r--backends/graphics/opengl/glerrorcheck.h3
-rw-r--r--backends/graphics/opengl/gltexture.cpp3
-rw-r--r--backends/graphics/opengl/gltexture.h6
-rw-r--r--backends/graphics/opengl/opengl-graphics.cpp36
-rw-r--r--backends/graphics/opengl/opengl-graphics.h5
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.cpp8
-rw-r--r--backends/graphics/openglsdl/openglsdl-graphics.h3
-rw-r--r--backends/graphics/openpandora/op-graphics.cpp1
-rw-r--r--backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp58
-rw-r--r--backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h41
-rw-r--r--backends/graphics/sdl/sdl-graphics.cpp18
-rw-r--r--backends/graphics/sdl/sdl-graphics.h4
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.cpp3
-rw-r--r--backends/graphics/symbiansdl/symbiansdl-graphics.h3
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.cpp8
-rw-r--r--backends/graphics/wincesdl/wincesdl-graphics.h3
-rw-r--r--backends/keymapper/action.cpp3
-rw-r--r--backends/keymapper/action.h3
-rw-r--r--backends/keymapper/hardware-key.h4
-rw-r--r--backends/keymapper/keymap.cpp3
-rw-r--r--backends/keymapper/keymap.h3
-rw-r--r--backends/keymapper/keymapper.cpp3
-rw-r--r--backends/keymapper/keymapper.h3
-rw-r--r--backends/keymapper/remap-dialog.cpp4
-rw-r--r--backends/keymapper/remap-dialog.h9
-rw-r--r--backends/keymapper/types.h3
-rw-r--r--backends/log/log.cpp3
-rw-r--r--backends/log/log.h3
-rw-r--r--backends/midi/alsa.cpp19
-rw-r--r--backends/midi/camd.cpp19
-rw-r--r--backends/midi/coreaudio.cpp5
-rw-r--r--backends/midi/coremidi.cpp5
-rw-r--r--backends/midi/dmedia.cpp8
-rw-r--r--backends/midi/seq.cpp5
-rw-r--r--backends/midi/stmidi.cpp3
-rw-r--r--backends/midi/timidity.cpp9
-rw-r--r--backends/midi/windows.cpp5
-rw-r--r--backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp5
-rw-r--r--backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h3
-rw-r--r--backends/mixer/sdl/sdl-mixer.cpp5
-rw-r--r--backends/mixer/sdl/sdl-mixer.h3
-rw-r--r--backends/mixer/symbiansdl/symbiansdl-mixer.cpp3
-rw-r--r--backends/mixer/symbiansdl/symbiansdl-mixer.h3
-rw-r--r--backends/mixer/wincesdl/wincesdl-mixer.cpp8
-rw-r--r--backends/mixer/wincesdl/wincesdl-mixer.h3
-rw-r--r--backends/modular-backend.cpp19
-rw-r--r--backends/modular-backend.h6
-rw-r--r--backends/module.mk150
-rw-r--r--backends/mutex/mutex.h3
-rw-r--r--backends/mutex/null/null-mutex.h3
-rw-r--r--backends/mutex/sdl/sdl-mutex.cpp3
-rw-r--r--backends/mutex/sdl/sdl-mutex.h3
-rw-r--r--backends/platform/android/android.cpp21
-rw-r--r--backends/platform/android/android.h4
-rw-r--r--backends/platform/android/android.mk24
-rw-r--r--backends/platform/android/asset-archive.cpp4
-rw-r--r--backends/platform/android/asset-archive.h3
-rw-r--r--backends/platform/android/events.cpp28
-rw-r--r--backends/platform/android/gfx.cpp26
-rw-r--r--backends/platform/android/jni.cpp22
-rw-r--r--backends/platform/android/jni.h3
-rw-r--r--backends/platform/android/org/inodes/gus/scummvm/ScummVM.java4
-rw-r--r--backends/platform/android/texture.cpp36
-rw-r--r--backends/platform/android/texture.h3
-rw-r--r--backends/platform/dc/DCLauncherDialog.h3
-rw-r--r--backends/platform/dc/Makefile4
-rw-r--r--backends/platform/dc/audio.cpp3
-rw-r--r--backends/platform/dc/dc-fs.cpp5
-rw-r--r--backends/platform/dc/dc.h23
-rw-r--r--backends/platform/dc/dcloader.cpp3
-rw-r--r--backends/platform/dc/dcloader.h3
-rw-r--r--backends/platform/dc/dcmain.cpp11
-rw-r--r--backends/platform/dc/display.cpp5
-rw-r--r--backends/platform/dc/dreamcast.mk6
-rw-r--r--backends/platform/dc/icon.cpp3
-rw-r--r--backends/platform/dc/icon.h3
-rw-r--r--backends/platform/dc/input.cpp5
-rw-r--r--backends/platform/dc/label.cpp3
-rw-r--r--backends/platform/dc/label.h3
-rw-r--r--backends/platform/dc/module.mk2
-rw-r--r--backends/platform/dc/plugins.cpp (renamed from backends/plugins/dc/dc-provider.cpp)50
-rw-r--r--backends/platform/dc/portdefs.h3
-rw-r--r--backends/platform/dc/selector.cpp5
-rw-r--r--backends/platform/dc/softkbd.cpp3
-rw-r--r--backends/platform/dc/softkbd.h3
-rw-r--r--backends/platform/dc/time.cpp3
-rw-r--r--backends/platform/dc/vmsave.cpp8
-rw-r--r--backends/platform/dingux/dingux.cpp3
-rw-r--r--backends/platform/dingux/dingux.h3
-rw-r--r--backends/platform/dingux/main.cpp5
-rw-r--r--backends/platform/dingux/module.mk10
-rw-r--r--backends/platform/ds/arm7/source/main.cpp3
-rw-r--r--backends/platform/ds/arm9/dist/readme_ds.txt2
-rw-r--r--backends/platform/ds/arm9/makefile2
-rw-r--r--backends/platform/ds/arm9/source/adpcm_arm.s3
-rw-r--r--backends/platform/ds/arm9/source/blitters.cpp3
-rw-r--r--backends/platform/ds/arm9/source/blitters.h3
-rw-r--r--backends/platform/ds/arm9/source/blitters_arm.s3
-rw-r--r--backends/platform/ds/arm9/source/cdaudio.cpp3
-rw-r--r--backends/platform/ds/arm9/source/cdaudio.h3
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp6
-rw-r--r--backends/platform/ds/arm9/source/dsmain.h3
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.cpp3
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.h3
-rw-r--r--backends/platform/ds/arm9/source/fat/gba_nds_fat.c5
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.cpp3
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.h3
-rw-r--r--backends/platform/ds/arm9/source/keys.h3
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp31
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h6
-rw-r--r--backends/platform/ds/arm9/source/portdefs.h3
-rw-r--r--backends/platform/ds/arm9/source/scummhelp.cpp3
-rw-r--r--backends/platform/ds/arm9/source/scummhelp.h3
-rw-r--r--backends/platform/ds/arm9/source/touchkeyboard.h3
-rw-r--r--backends/platform/ds/arm9/source/wordcompletion.cpp3
-rw-r--r--backends/platform/ds/arm9/source/wordcompletion.h3
-rw-r--r--backends/platform/ds/arm9/source/zipreader.cpp4
-rw-r--r--backends/platform/ds/arm9/source/zipreader.h3
-rw-r--r--backends/platform/ds/commoninclude/NDS/scummvm_ipc.h3
-rw-r--r--backends/platform/ds/ds.mk4
-rw-r--r--backends/platform/ds/makefile2
-rw-r--r--backends/platform/gp2x/build/README-GP2X54
-rwxr-xr-xbackends/platform/gp2x/build/bundle.sh10
-rw-r--r--backends/platform/gp2x/gp2x-common.h18
-rw-r--r--backends/platform/gp2x/gp2x-hw.cpp3
-rw-r--r--backends/platform/gp2x/gp2x-hw.h3
-rw-r--r--backends/platform/gp2x/gp2x-main.cpp10
-rw-r--r--backends/platform/gp2x/gp2x-mem.cpp3
-rw-r--r--backends/platform/gp2x/gp2x-mem.h3
-rw-r--r--backends/platform/gp2x/gp2x.cpp10
-rw-r--r--backends/platform/gp2x/module.mk3
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-build.sh (renamed from backends/platform/gph/caanoo/build.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-bundle-debug.sh (renamed from backends/platform/gph/caanoo/bundle-debug.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-bundle.sh (renamed from backends/platform/gph/caanoo/bundle.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-config-alleng.sh (renamed from backends/platform/gph/caanoo/config-alleng.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/caanoo-config.sh (renamed from backends/platform/gph/caanoo/config.sh)0
-rwxr-xr-xbackends/platform/gph/build/clean.sh2
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2x-build.sh (renamed from backends/platform/gp2x/build/build.sh)0
-rw-r--r--backends/platform/gph/build/gp2x-bundle.sh19
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2x-config-alleng.sh (renamed from backends/platform/gp2x/build/config-alleng.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2x-config.sh (renamed from backends/platform/gp2x/build/config.sh)2
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-build.sh (renamed from backends/platform/gph/build/build.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-bundle-debug.sh (renamed from backends/platform/gph/build/bundle-debug.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-bundle.sh (renamed from backends/platform/gph/build/bundle.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-config-alleng.sh (renamed from backends/platform/gph/build/config-alleng.sh)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/build/gp2xwiz-config.sh (renamed from backends/platform/gph/build/config.sh)0
-rw-r--r--backends/platform/gph/build/scummvm.pngbin2656 -> 0 bytes
-rwxr-xr-xbackends/platform/gph/caanoo-bundle.mk20
-rwxr-xr-xbackends/platform/gph/caanoo/clean.sh8
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/caanoo/scummvm-gdb.gpe (renamed from backends/platform/gph/build/scummvm-gdb.gpe)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/caanoo/scummvm.gpe (renamed from backends/platform/gph/caanoo/scummvm.gpe)0
-rw-r--r--backends/platform/gph/devices/common/README-GPH (renamed from backends/platform/gph/build/README-GPH)4
-rw-r--r--backends/platform/gph/devices/common/scummvm.ini (renamed from backends/platform/gph/build/scummvm.ini)0
-rw-r--r--backends/platform/gph/devices/common/scummvm.png (renamed from backends/platform/gp2x/build/scummvm.png)bin2656 -> 2656 bytes
-rw-r--r--backends/platform/gph/devices/common/scummvmb.png (renamed from backends/platform/gph/build/scummvmb.png)bin34274 -> 34274 bytes
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/Makefile (renamed from backends/platform/gp2x/mmuhack/Makefile)0
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.h (renamed from backends/platform/gp2x/mmuhack/flush_uppermem_cache.h)0
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.s (renamed from backends/platform/gp2x/mmuhack/flush_uppermem_cache.s)0
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/mmuhack.c (renamed from backends/platform/gp2x/mmuhack/mmuhack.c)3
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o (renamed from backends/platform/gp2x/build/mmuhack.o)bin1720 -> 1720 bytes
-rw-r--r--backends/platform/gph/devices/gp2x/mmuhack/readme.txt (renamed from backends/platform/gp2x/mmuhack/readme.txt)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/gp2x/scummvm.gpe (renamed from backends/platform/gp2x/build/scummvm.gpe)4
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe (renamed from backends/platform/gph/caanoo/scummvm-gdb.gpe)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/devices/gp2xwiz/scummvm.gpe (renamed from backends/platform/gph/build/scummvm.gpe)0
-rw-r--r--[-rwxr-xr-x]backends/platform/gph/gp2x-bundle.mk (renamed from backends/platform/gp2x/gp2x-bundle.mk)23
-rwxr-xr-xbackends/platform/gph/gp2xwiz-bundle.mk21
-rw-r--r--backends/platform/gph/gph-backend.cpp24
-rw-r--r--backends/platform/gph/gph-hw.cpp3
-rw-r--r--backends/platform/gph/gph-hw.h3
-rw-r--r--backends/platform/gph/gph-main.cpp2
-rw-r--r--backends/platform/gph/gph-sdl.h3
-rw-r--r--backends/platform/gph/module.mk2
-rw-r--r--backends/platform/iphone/blit.cpp3
-rw-r--r--backends/platform/iphone/blit_arm.h3
-rw-r--r--backends/platform/iphone/blit_arm.s3
-rw-r--r--backends/platform/iphone/iphone_common.h3
-rw-r--r--backends/platform/iphone/iphone_keyboard.h3
-rw-r--r--backends/platform/iphone/iphone_keyboard.m3
-rw-r--r--backends/platform/iphone/iphone_main.m3
-rw-r--r--backends/platform/iphone/iphone_video.h3
-rw-r--r--backends/platform/iphone/iphone_video.m20
-rw-r--r--backends/platform/iphone/osys_events.cpp25
-rw-r--r--backends/platform/iphone/osys_main.cpp9
-rw-r--r--backends/platform/iphone/osys_main.h8
-rw-r--r--backends/platform/iphone/osys_sound.cpp3
-rw-r--r--backends/platform/iphone/osys_video.cpp9
-rw-r--r--backends/platform/linuxmoto/hardwarekeys.cpp3
-rw-r--r--backends/platform/linuxmoto/linuxmoto-main.cpp3
-rw-r--r--backends/platform/linuxmoto/linuxmoto-sdl.cpp3
-rw-r--r--backends/platform/linuxmoto/linuxmoto-sdl.h3
-rw-r--r--backends/platform/linuxmoto/module.mk4
-rw-r--r--backends/platform/n64/framfs_save_manager.cpp3
-rw-r--r--backends/platform/n64/framfs_save_manager.h3
-rw-r--r--backends/platform/n64/nintendo64.cpp3
-rw-r--r--backends/platform/n64/osys_n64.h6
-rw-r--r--backends/platform/n64/osys_n64_base.cpp43
-rw-r--r--backends/platform/n64/osys_n64_events.cpp18
-rw-r--r--backends/platform/n64/osys_n64_utilities.cpp3
-rwxr-xr-x[-rw-r--r--]backends/platform/n64/pad_rom.sh0
-rw-r--r--backends/platform/n64/pakfs_save_manager.cpp3
-rw-r--r--backends/platform/n64/pakfs_save_manager.h3
-rw-r--r--backends/platform/n64/portdefs.h3
-rw-r--r--backends/platform/null/null.cpp7
-rwxr-xr-xbackends/platform/openpandora/module.mk9
-rw-r--r--backends/platform/openpandora/op-backend.cpp17
-rw-r--r--backends/platform/openpandora/op-options.cpp3
-rw-r--r--backends/platform/openpandora/op-options.h3
-rw-r--r--backends/platform/openpandora/op-sdl.h1
-rw-r--r--backends/platform/ps2/DmaPipe.cpp3
-rw-r--r--backends/platform/ps2/DmaPipe.h3
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp9
-rw-r--r--backends/platform/ps2/Gs2dScreen.h5
-rw-r--r--backends/platform/ps2/GsDefs.h3
-rw-r--r--backends/platform/ps2/asyncfio.cpp3
-rw-r--r--backends/platform/ps2/asyncfio.h3
-rw-r--r--backends/platform/ps2/eecodyvdfs.c3
-rw-r--r--backends/platform/ps2/eecodyvdfs.h3
-rw-r--r--backends/platform/ps2/fileio.cpp3
-rw-r--r--backends/platform/ps2/fileio.h3
-rw-r--r--backends/platform/ps2/icon.cpp3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.h3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/irx_imports.h3
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c3
-rw-r--r--backends/platform/ps2/iop/rpckbd/src/irx_imports.h3
-rw-r--r--backends/platform/ps2/irxboot.cpp5
-rw-r--r--backends/platform/ps2/irxboot.h3
-rw-r--r--backends/platform/ps2/ps2debug.h3
-rw-r--r--backends/platform/ps2/ps2input.cpp5
-rw-r--r--backends/platform/ps2/ps2input.h7
-rw-r--r--backends/platform/ps2/ps2mutex.cpp5
-rw-r--r--backends/platform/ps2/ps2pad.cpp5
-rw-r--r--backends/platform/ps2/ps2pad.h3
-rw-r--r--backends/platform/ps2/ps2time.cpp5
-rw-r--r--backends/platform/ps2/savefilemgr.cpp7
-rw-r--r--backends/platform/ps2/savefilemgr.h3
-rw-r--r--backends/platform/ps2/sysdefs.h3
-rw-r--r--backends/platform/ps2/systemps2.cpp10
-rw-r--r--backends/platform/ps2/systemps2.h12
-rw-r--r--backends/platform/psp/Makefile2
-rw-r--r--backends/platform/psp/README.PSP2
-rw-r--r--backends/platform/psp/audio.cpp3
-rw-r--r--backends/platform/psp/audio.h3
-rw-r--r--backends/platform/psp/cursor.cpp19
-rw-r--r--backends/platform/psp/cursor.h3
-rw-r--r--backends/platform/psp/default_display_client.cpp5
-rw-r--r--backends/platform/psp/default_display_client.h3
-rw-r--r--backends/platform/psp/display_client.cpp17
-rw-r--r--backends/platform/psp/display_client.h3
-rw-r--r--backends/platform/psp/display_manager.cpp5
-rw-r--r--backends/platform/psp/display_manager.h3
-rw-r--r--backends/platform/psp/dummy.cpp3
-rw-r--r--backends/platform/psp/image_viewer.cpp3
-rw-r--r--backends/platform/psp/image_viewer.h3
-rw-r--r--backends/platform/psp/input.cpp3
-rw-r--r--backends/platform/psp/input.h3
-rw-r--r--backends/platform/psp/memory.cpp3
-rw-r--r--backends/platform/psp/memory.h3
-rw-r--r--backends/platform/psp/mp3.cpp17
-rw-r--r--backends/platform/psp/mp3.h5
-rw-r--r--backends/platform/psp/osys_psp.cpp6
-rw-r--r--backends/platform/psp/osys_psp.h4
-rw-r--r--backends/platform/psp/png_loader.cpp3
-rw-r--r--backends/platform/psp/png_loader.h3
-rw-r--r--backends/platform/psp/portdefs.h9
-rw-r--r--backends/platform/psp/powerman.cpp3
-rw-r--r--backends/platform/psp/powerman.h3
-rw-r--r--backends/platform/psp/psp_main.cpp17
-rw-r--r--backends/platform/psp/pspkeyboard.cpp3
-rw-r--r--backends/platform/psp/pspkeyboard.h3
-rw-r--r--backends/platform/psp/psppixelformat.cpp3
-rw-r--r--backends/platform/psp/psppixelformat.h3
-rw-r--r--backends/platform/psp/rtc.cpp3
-rw-r--r--backends/platform/psp/rtc.h3
-rw-r--r--backends/platform/psp/tests.cpp3
-rw-r--r--backends/platform/psp/tests.h3
-rw-r--r--backends/platform/psp/thread.cpp3
-rw-r--r--backends/platform/psp/thread.h3
-rw-r--r--backends/platform/psp/trace.cpp16
-rw-r--r--backends/platform/psp/trace.h3
-rw-r--r--backends/platform/samsungtv/main.cpp9
-rw-r--r--backends/platform/samsungtv/module.mk3
-rw-r--r--backends/platform/samsungtv/samsungtv.cpp39
-rw-r--r--backends/platform/samsungtv/samsungtv.h13
-rw-r--r--backends/platform/sdl/amigaos/amigaos-main.cpp3
-rw-r--r--backends/platform/sdl/amigaos/amigaos.cpp3
-rw-r--r--backends/platform/sdl/amigaos/amigaos.h3
-rw-r--r--backends/platform/sdl/hardwarekeys.cpp3
-rw-r--r--backends/platform/sdl/macosx/macosx-main.cpp3
-rw-r--r--backends/platform/sdl/macosx/macosx.cpp3
-rw-r--r--backends/platform/sdl/macosx/macosx.h3
-rw-r--r--backends/platform/sdl/main.cpp6
-rw-r--r--backends/platform/sdl/module.mk2
-rw-r--r--backends/platform/sdl/posix/posix-main.cpp5
-rw-r--r--backends/platform/sdl/posix/posix.cpp15
-rw-r--r--backends/platform/sdl/posix/posix.h3
-rw-r--r--backends/platform/sdl/sdl-sys.h3
-rw-r--r--backends/platform/sdl/sdl.cpp26
-rw-r--r--backends/platform/sdl/sdl.h3
-rw-r--r--backends/platform/sdl/win32/win32-main.cpp3
-rw-r--r--backends/platform/sdl/win32/win32.cpp91
-rw-r--r--backends/platform/sdl/win32/win32.h4
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl5
-rw-r--r--backends/platform/symbian/BuildPackageUpload_LocalSettings.pl9
-rw-r--r--backends/platform/symbian/README2
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60.mmp.in3
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60_App.mmp3
-rw-r--r--backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg3
-rw-r--r--backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg3
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in8
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in8
-rw-r--r--backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg3
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80.mmp.in3
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80_App.mmp3
-rw-r--r--backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg3
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90.mmp.in3
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90_App.mmp3
-rw-r--r--backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg3
-rw-r--r--backends/platform/symbian/UIQ2/ScummVM.rss2
-rw-r--r--backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in3
-rw-r--r--backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg3
-rw-r--r--backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg3
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM.rss3
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658.rss3
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in8
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in8
-rw-r--r--backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg3
-rw-r--r--backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss3
-rw-r--r--backends/platform/symbian/mmp/scummvm_agi.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_agos.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_base.mmp.in7
-rw-r--r--backends/platform/symbian/mmp/scummvm_cine.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_cruise.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_draci.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_drascula.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_gob.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_groovie.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_hugo.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_kyra.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_lure.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_m4.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_made.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_mohawk.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_parallaction.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_queen.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_saga.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_sci.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_scumm.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_sky.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword1.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_sword2.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_teenagent.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_tinsel.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_toon.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_touche.mmp.in3
-rw-r--r--backends/platform/symbian/mmp/scummvm_tsage.mmp.in61
-rw-r--r--backends/platform/symbian/mmp/scummvm_tucker.mmp.in3
-rw-r--r--backends/platform/symbian/res/ScummVmAif.rss2
-rw-r--r--backends/platform/symbian/res/scummvm.rss2
-rw-r--r--backends/platform/symbian/res/scummvm_A0000658.rss2
-rw-r--r--backends/platform/symbian/src/ScummApp.cpp3
-rw-r--r--backends/platform/symbian/src/ScummApp.h3
-rw-r--r--backends/platform/symbian/src/ScummVMApp.h3
-rw-r--r--backends/platform/symbian/src/ScummVm.hrh3
-rw-r--r--backends/platform/symbian/src/SymbianActions.cpp3
-rw-r--r--backends/platform/symbian/src/SymbianActions.h3
-rw-r--r--backends/platform/symbian/src/SymbianMain.cpp3
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp3
-rw-r--r--backends/platform/symbian/src/SymbianOS.h3
-rw-r--r--backends/platform/symbian/src/portdefs.h8
-rw-r--r--backends/platform/symbian/src/vsnprintf.h805
-rw-r--r--backends/platform/webos/main.cpp52
-rw-r--r--backends/platform/webos/module.mk10
-rw-r--r--backends/platform/webos/webos.cpp70
-rw-r--r--backends/platform/webos/webos.h (renamed from backends/plugins/dc/dc-provider.h)23
-rw-r--r--backends/platform/webos/webos.mk96
-rw-r--r--backends/platform/wii/main.cpp4
-rw-r--r--backends/platform/wii/options.cpp6
-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/CEActionsPocket.cpp3
-rw-r--r--backends/platform/wince/CEActionsPocket.h3
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp3
-rw-r--r--backends/platform/wince/CEActionsSmartphone.h3
-rw-r--r--backends/platform/wince/CEDevice.cpp3
-rw-r--r--backends/platform/wince/CEDevice.h3
-rw-r--r--backends/platform/wince/CEException.cpp3
-rw-r--r--backends/platform/wince/CEException.h3
-rw-r--r--backends/platform/wince/CELauncherDialog.cpp53
-rw-r--r--backends/platform/wince/CELauncherDialog.h5
-rw-r--r--backends/platform/wince/CEScaler.cpp3
-rw-r--r--backends/platform/wince/CEScaler.h3
-rw-r--r--backends/platform/wince/CEgui/CEGUI.h3
-rw-r--r--backends/platform/wince/CEgui/GUIElement.cpp3
-rw-r--r--backends/platform/wince/CEgui/GUIElement.h3
-rw-r--r--backends/platform/wince/CEgui/ItemAction.cpp3
-rw-r--r--backends/platform/wince/CEgui/ItemAction.h3
-rw-r--r--backends/platform/wince/CEgui/ItemSwitch.cpp3
-rw-r--r--backends/platform/wince/CEgui/ItemSwitch.h3
-rw-r--r--backends/platform/wince/CEgui/Panel.cpp3
-rw-r--r--backends/platform/wince/CEgui/Panel.h3
-rw-r--r--backends/platform/wince/CEgui/PanelItem.cpp3
-rw-r--r--backends/platform/wince/CEgui/PanelItem.h3
-rw-r--r--backends/platform/wince/CEgui/PanelKeyboard.cpp3
-rw-r--r--backends/platform/wince/CEgui/PanelKeyboard.h3
-rw-r--r--backends/platform/wince/CEgui/SDL_ImageResource.cpp3
-rw-r--r--backends/platform/wince/CEgui/SDL_ImageResource.h3
-rw-r--r--backends/platform/wince/CEgui/Toolbar.cpp3
-rw-r--r--backends/platform/wince/CEgui/Toolbar.h3
-rw-r--r--backends/platform/wince/CEgui/ToolbarHandler.cpp3
-rw-r--r--backends/platform/wince/CEgui/ToolbarHandler.h3
-rw-r--r--backends/platform/wince/CEkeys/CEKeys.h3
-rw-r--r--backends/platform/wince/CEkeys/EventsBuffer.cpp3
-rw-r--r--backends/platform/wince/CEkeys/EventsBuffer.h3
-rw-r--r--backends/platform/wince/Makefile2
-rw-r--r--backends/platform/wince/README-WinCE.txt22
-rw-r--r--backends/platform/wince/missing/io.h1
-rw-r--r--backends/platform/wince/missing/missing.cpp3
-rw-r--r--backends/platform/wince/module.mk5
-rw-r--r--backends/platform/wince/portdefs.h7
-rw-r--r--backends/platform/wince/smartLandScale.s3
-rw-r--r--backends/platform/wince/stub.cpp3
-rw-r--r--backends/platform/wince/wince-sdl.cpp5
-rw-r--r--backends/platform/wince/wince-sdl.h3
-rw-r--r--backends/platform/wince/wince.mk7
-rw-r--r--backends/plugins/ds/ds-provider.cpp3
-rw-r--r--backends/plugins/ds/ds-provider.h3
-rw-r--r--backends/plugins/dynamic-plugin.h4
-rw-r--r--backends/plugins/elf/arm-loader.cpp3
-rw-r--r--backends/plugins/elf/arm-loader.h3
-rw-r--r--backends/plugins/elf/elf-loader.cpp3
-rw-r--r--backends/plugins/elf/elf-loader.h3
-rw-r--r--backends/plugins/elf/elf-provider.cpp3
-rw-r--r--backends/plugins/elf/elf-provider.h3
-rw-r--r--backends/plugins/elf/elf32.h3
-rw-r--r--backends/plugins/elf/memory-manager.cpp4
-rw-r--r--backends/plugins/elf/memory-manager.h3
-rw-r--r--backends/plugins/elf/mips-loader.cpp3
-rw-r--r--backends/plugins/elf/mips-loader.h3
-rw-r--r--backends/plugins/elf/ppc-loader.cpp3
-rw-r--r--backends/plugins/elf/ppc-loader.h3
-rw-r--r--backends/plugins/elf/shorts-segment-manager.cpp3
-rw-r--r--backends/plugins/elf/shorts-segment-manager.h3
-rw-r--r--backends/plugins/elf/version.cpp3
-rw-r--r--backends/plugins/elf/version.h3
-rw-r--r--backends/plugins/posix/posix-provider.cpp9
-rw-r--r--backends/plugins/posix/posix-provider.h9
-rw-r--r--backends/plugins/ps2/ps2-provider.cpp3
-rw-r--r--backends/plugins/ps2/ps2-provider.h3
-rw-r--r--backends/plugins/psp/psp-provider.cpp3
-rw-r--r--backends/plugins/psp/psp-provider.h3
-rw-r--r--backends/plugins/sdl/sdl-provider.cpp5
-rw-r--r--backends/plugins/sdl/sdl-provider.h5
-rw-r--r--backends/plugins/wii/wii-provider.cpp3
-rw-r--r--backends/plugins/wii/wii-provider.h3
-rw-r--r--backends/plugins/win32/win32-provider.cpp16
-rw-r--r--backends/plugins/win32/win32-provider.h3
-rw-r--r--backends/saves/default/default-saves.cpp11
-rw-r--r--backends/saves/default/default-saves.h3
-rw-r--r--backends/saves/posix/posix-saves.cpp42
-rw-r--r--backends/saves/posix/posix-saves.h6
-rw-r--r--backends/saves/psp/psp-saves.cpp17
-rw-r--r--backends/saves/psp/psp-saves.h3
-rw-r--r--backends/saves/savefile.cpp7
-rw-r--r--backends/timer/default/default-timer.cpp3
-rw-r--r--backends/timer/default/default-timer.h5
-rw-r--r--backends/timer/psp/timer.cpp17
-rw-r--r--backends/timer/psp/timer.h3
-rw-r--r--backends/timer/sdl/sdl-timer.cpp5
-rw-r--r--backends/timer/sdl/sdl-timer.h3
-rw-r--r--backends/vkeybd/image-map.cpp5
-rw-r--r--backends/vkeybd/image-map.h3
-rw-r--r--backends/vkeybd/packs/vkeybd_default.zipbin184936 -> 179277 bytes
-rw-r--r--backends/vkeybd/packs/vkeybd_default/vkeybd_default.xml2
-rw-r--r--backends/vkeybd/polygon.cpp3
-rw-r--r--backends/vkeybd/polygon.h3
-rw-r--r--backends/vkeybd/virtual-keyboard-gui.cpp15
-rw-r--r--backends/vkeybd/virtual-keyboard-gui.h3
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.cpp5
-rw-r--r--backends/vkeybd/virtual-keyboard-parser.h5
-rw-r--r--backends/vkeybd/virtual-keyboard.cpp8
-rw-r--r--backends/vkeybd/virtual-keyboard.h5
572 files changed, 3081 insertions, 2850 deletions
diff --git a/backends/audiocd/audiocd.h b/backends/audiocd/audiocd.h
index f218db7f72..92b7598cb5 100644
--- a/backends/audiocd/audiocd.h
+++ b/backends/audiocd/audiocd.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_AUDIOCD_ABSTRACT_H
@@ -111,7 +108,7 @@ public:
//@{
/**
- * Initialise the specified CD drive for audio playback.
+ * Initialize the specified CD drive for audio playback.
* @param drive the drive id
* @return true if the CD drive was inited succesfully
*/
diff --git a/backends/audiocd/default/default-audiocd.cpp b/backends/audiocd/default/default-audiocd.cpp
index 0acc64b7f2..819b9c4522 100644
--- a/backends/audiocd/default/default-audiocd.cpp
+++ b/backends/audiocd/default/default-audiocd.cpp
@@ -18,9 +18,6 @@
* 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 "backends/audiocd/default/default-audiocd.h"
diff --git a/backends/audiocd/default/default-audiocd.h b/backends/audiocd/default/default-audiocd.h
index d3e0150fb6..1971ed8f6e 100644
--- a/backends/audiocd/default/default-audiocd.h
+++ b/backends/audiocd/default/default-audiocd.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_AUDIOCD_DEFAULT_H
diff --git a/backends/audiocd/sdl/sdl-audiocd.cpp b/backends/audiocd/sdl/sdl-audiocd.cpp
index 4136c34403..b5f97571f3 100644
--- a/backends/audiocd/sdl/sdl-audiocd.cpp
+++ b/backends/audiocd/sdl/sdl-audiocd.cpp
@@ -18,15 +18,13 @@
* 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/scummsys.h"
#if defined(SDL_BACKEND)
+#include "common/textconsole.h"
#include "backends/audiocd/sdl/sdl-audiocd.h"
SdlAudioCDManager::SdlAudioCDManager()
diff --git a/backends/audiocd/sdl/sdl-audiocd.h b/backends/audiocd/sdl/sdl-audiocd.h
index b46afab9f2..85bde353df 100644
--- a/backends/audiocd/sdl/sdl-audiocd.h
+++ b/backends/audiocd/sdl/sdl-audiocd.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_AUDIOCD_SDL_H
diff --git a/backends/base-backend.cpp b/backends/base-backend.cpp
index f349cc8005..624de1f3e5 100644
--- a/backends/base-backend.cpp
+++ b/backends/base-backend.cpp
@@ -60,7 +60,7 @@ void BaseBackend::fillScreen(uint32 col) {
*/
-#if defined(UNIX)
+#if defined(POSIX)
#if defined(SAMSUNGTV)
#define DEFAULT_CONFIG_FILE "/dtv/usb/sda1/.scummvmrc"
#else
@@ -68,7 +68,7 @@ void BaseBackend::fillScreen(uint32 col) {
#endif
#endif
-#if !defined(UNIX)
+#if !defined(POSIX)
#define DEFAULT_CONFIG_FILE "scummvm.ini"
#endif
diff --git a/backends/base-backend.h b/backends/base-backend.h
index de94d85523..864c11544a 100644
--- a/backends/base-backend.h
+++ b/backends/base-backend.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_BASE_BACKEND_H
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 9befeb00c9..bb74933596 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index 06db1dc027..3a8025f5e8 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_EVENTS_DEFAULT_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
@@ -31,10 +28,10 @@
namespace Common {
#ifdef ENABLE_KEYMAPPER
- class Keymapper;
+class Keymapper;
#endif
#ifdef ENABLE_VKEYBD
- class VirtualKeyboard;
+class VirtualKeyboard;
#endif
}
diff --git a/backends/events/dinguxsdl/dinguxsdl-events.cpp b/backends/events/dinguxsdl/dinguxsdl-events.cpp
index 7a7443299c..946507ccfd 100644
--- a/backends/events/dinguxsdl/dinguxsdl-events.cpp
+++ b/backends/events/dinguxsdl/dinguxsdl-events.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/events/dinguxsdl/dinguxsdl-events.h b/backends/events/dinguxsdl/dinguxsdl-events.h
index 1201e5b8ce..b348bafa78 100644
--- a/backends/events/dinguxsdl/dinguxsdl-events.h
+++ b/backends/events/dinguxsdl/dinguxsdl-events.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_EVENTS_SDL_DINGUX_H
diff --git a/backends/events/gp2xsdl/gp2xsdl-events.cpp b/backends/events/gp2xsdl/gp2xsdl-events.cpp
index 91feb2b447..86d4de384f 100644
--- a/backends/events/gp2xsdl/gp2xsdl-events.cpp
+++ b/backends/events/gp2xsdl/gp2xsdl-events.cpp
@@ -18,22 +18,15 @@
* 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/scummsys.h"
-#if defined(GP2X)
+#if defined(GP2X_OLD)
#include "backends/events/gp2xsdl/gp2xsdl-events.h"
-#if defined(GP2X)
#include "backends/platform/gp2x/gp2x-hw.h"
#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
-#else
-#include "backends/platform/gp2xwiz/gp2xwiz-hw.h"
-#endif
#include "backends/platform/sdl/sdl.h"
@@ -88,7 +81,6 @@ enum {
GP2XSdlEventSource::GP2XSdlEventSource()
: _buttonStateL(false){
-
}
void GP2XSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event) {
@@ -468,5 +460,4 @@ bool GP2XSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) {
return false;
}
-
#endif
diff --git a/backends/events/gp2xsdl/gp2xsdl-events.h b/backends/events/gp2xsdl/gp2xsdl-events.h
index 5bf472d3d8..0d74c1bcac 100644
--- a/backends/events/gp2xsdl/gp2xsdl-events.h
+++ b/backends/events/gp2xsdl/gp2xsdl-events.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_EVENTS_SDL_GP2X_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
diff --git a/backends/events/gph/gph-events.cpp b/backends/events/gph/gph-events.cpp
index 05fd747605..d2b3483f84 100644
--- a/backends/events/gph/gph-events.cpp
+++ b/backends/events/gph/gph-events.cpp
@@ -26,7 +26,7 @@
* GPH: Device Specific Event Handling.
*/
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
#include "backends/events/gph/gph-events.h"
#include "backends/graphics/gph/gph-graphics.h"
@@ -78,7 +78,9 @@ int BUTTON_STATE_L = false;
BUTTON_SELECT = 62
};
-#else
+#endif
+
+#if defined(GP2XWIZ)
/* Wiz: Main Joystick Mappings */
enum {
@@ -115,6 +117,42 @@ int BUTTON_STATE_L = false;
#endif
+#if defined(GP2X)
+
+enum {
+ /* DPAD/Stick */
+ BUTTON_UP = 0,
+ BUTTON_UPLEFT = 1,
+ BUTTON_LEFT = 2,
+ BUTTON_DOWNLEFT = 3,
+ BUTTON_DOWN = 4,
+ BUTTON_DOWNRIGHT = 5,
+ BUTTON_RIGHT = 6,
+ BUTTON_UPRIGHT = 7,
+ /* Joystick Buttons */
+ BUTTON_MENU = 8, // Start on F100 GP2X
+ BUTTON_SELECT = 9,
+ BUTTON_L = 10,
+ BUTTON_R = 11,
+ BUTTON_A = 12,
+ BUTTON_B = 13,
+ BUTTON_X = 14,
+ BUTTON_Y = 15,
+ BUTTON_VOLUP = 16,
+ BUTTON_VOLDOWN = 17,
+ BUTTON_CLICK = 18
+};
+
+enum {
+ /* Unused Joystick Buttons on the GP2X */
+ BUTTON_HOME = 51,
+ BUTTON_HOLD = 52,
+ BUTTON_HELP = 53,
+ BUTTON_HELP2 = 54
+};
+
+#endif
+
enum {
/* Touchscreen TapMode */
TAPMODE_LEFT = 0,
diff --git a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp
index 751e4f06ed..e859c5291b 100644
--- a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp
+++ b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/events/linuxmotosdl/linuxmotosdl-events.h b/backends/events/linuxmotosdl/linuxmotosdl-events.h
index 3b59f09245..7b0c8fcc73 100644
--- a/backends/events/linuxmotosdl/linuxmotosdl-events.h
+++ b/backends/events/linuxmotosdl/linuxmotosdl-events.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_EVENTS_SDL_LINUXMOTO_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
diff --git a/backends/events/openpandora/op-events.h b/backends/events/openpandora/op-events.h
index 4b13ef2105..9aa637992a 100644
--- a/backends/events/openpandora/op-events.h
+++ b/backends/events/openpandora/op-events.h
@@ -37,8 +37,6 @@ protected:
bool _buttonStateL;
bool remapKey(SDL_Event &ev, Common::Event &event);
-
-//private:
bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
};
diff --git a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
index deb4e8cc67..5e3659839a 100644
--- a/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
+++ b/backends/events/samsungtvsdl/samsungtvsdl-events.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/events/samsungtvsdl/samsungtvsdl-events.h b/backends/events/samsungtvsdl/samsungtvsdl-events.h
index 453c6473a3..4b9ccc9bf8 100644
--- a/backends/events/samsungtvsdl/samsungtvsdl-events.h
+++ b/backends/events/samsungtvsdl/samsungtvsdl-events.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_EVENTS_SDL_SAMSUNGTV_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index ce846a0836..835d98e718 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -31,6 +28,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 +63,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);
}
}
@@ -281,7 +279,7 @@ bool SdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_QUIT;
return true;
}
-#elif defined(UNIX)
+#elif defined(POSIX)
// On other *nix systems, Control-Q quits
if ((ev.key.keysym.mod & KMOD_CTRL) && ev.key.keysym.sym == 'q') {
event.type = Common::EVENT_QUIT;
@@ -325,7 +323,7 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
if (ev.key.keysym.sym == 'm' || // Ctrl-m toggles mouse capture
#if defined(MACOSX)
// Meta - Q, handled below
-#elif defined(UNIX)
+#elif defined(POSIX)
ev.key.keysym.sym == 'q' || // On other *nix systems, Control-Q quits
#else
ev.key.keysym.sym == 'z' || // Ctrl-z quit
@@ -338,7 +336,7 @@ bool SdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
#if defined(MACOSX)
if ((mod & KMOD_META) && ev.key.keysym.sym == 'q')
return false; // On Macintosh, Cmd-Q quits
-#elif defined(UNIX)
+#elif defined(POSIX)
// Control Q has already been handled above
#else
if ((mod & KMOD_ALT) && ev.key.keysym.sym == 'x')
diff --git a/backends/events/sdl/sdl-events.h b/backends/events/sdl/sdl-events.h
index 436635f78a..227d6e1607 100644
--- a/backends/events/sdl/sdl-events.h
+++ b/backends/events/sdl/sdl-events.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_EVENTS_SDL_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
diff --git a/backends/events/symbiansdl/symbiansdl-events.cpp b/backends/events/symbiansdl/symbiansdl-events.cpp
index 8c995e7eb7..40bd89b8dc 100644
--- a/backends/events/symbiansdl/symbiansdl-events.cpp
+++ b/backends/events/symbiansdl/symbiansdl-events.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/events/symbiansdl/symbiansdl-events.h b/backends/events/symbiansdl/symbiansdl-events.h
index b65d7baf0e..7186fc9116 100644
--- a/backends/events/symbiansdl/symbiansdl-events.h
+++ b/backends/events/symbiansdl/symbiansdl-events.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_EVENTS_SYMBIAN_SDL_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
diff --git a/backends/events/webossdl/webossdl-events.cpp b/backends/events/webossdl/webossdl-events.cpp
new file mode 100644
index 0000000000..4a17bc2066
--- /dev/null
+++ b/backends/events/webossdl/webossdl-events.cpp
@@ -0,0 +1,248 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#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"
+
+#include "backends/events/webossdl/webossdl-events.h"
+#include "gui/message.h"
+
+// Inidicates if gesture area is pressed down or not.
+static bool gestureDown = false;
+
+// The timestamp when screen was pressed down.
+static int screenDownTime = 0;
+
+// The timestamp when a possible drag operation was triggered.
+static int dragStartTime = 0;
+
+// The index of the motion pointer.
+static int motionPtrIndex = -1;
+
+// The maximum horizontal motion during dragging (For tap recognition).
+static int dragDiffX = 0;
+
+// The maximum vertical motion during dragging (For tap recognition).
+static int dragDiffY = 0;
+
+// Indicates if we are in drag mode.
+static bool dragging = false;
+
+// The current mouse position on the screen.
+static int curX = 0, curY = 0;
+
+// The time (seconds after 1/1/1970) when program started.
+static time_t programStartTime = time(0);
+
+/**
+ * Returns the number of passed milliseconds since program start.
+ *
+ * @return The number of passed milliseconds.
+ */
+static time_t getMillis()
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (time(0) - programStartTime) * 1000 + tv.tv_usec / 1000;
+}
+
+/**
+ * WebOS devices only have a Shift key and a CTRL key. There is also an Alt
+ * key (the orange key) but this is already processed by WebOS to change the
+ * mode of the keys so ScummVM must not use this key as a modifier. Instead
+ * pressing down the gesture area is used as Alt key.
+ *
+ * @param mod The pressed key modifier as detected by SDL.
+ * @param event The ScummVM event to setup.
+ */
+void WebOSSdlEventSource::SDLModToOSystemKeyFlags(SDLMod mod,
+ Common::Event &event) {
+ event.kbd.flags = 0;
+
+ if (mod & KMOD_SHIFT)
+ 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;
+}
+
+/**
+ * Before calling the original SDL implementation this method checks if the
+ * gesture area is pressed down.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleKeyDown(SDL_Event &ev, Common::Event &event) {
+ // Handle gesture area tap.
+ if (ev.key.keysym.sym == SDLK_WORLD_71) {
+ gestureDown = true;
+ 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);
+}
+
+/**
+ * Before calling the original SDL implementation this method checks if the
+ * gesture area has been released.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleKeyUp(SDL_Event &ev, Common::Event &event) {
+ // Handle gesture area tap.
+ if (ev.key.keysym.sym == SDLK_WORLD_71) {
+ gestureDown = false;
+ return true;
+ }
+
+ // Call original SDL key handler.
+ return SdlEventSource::handleKeyUp(ev, event);
+}
+
+/**
+ * Handles mouse button press.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseButtonDown(SDL_Event &ev, Common::Event &event) {
+ if (motionPtrIndex == -1) {
+ motionPtrIndex = ev.button.which;
+ dragDiffX = 0;
+ dragDiffY = 0;
+ screenDownTime = getMillis();
+
+ // Start dragging when pressing the screen shortly after a tap.
+ if (getMillis() - dragStartTime < 250) {
+ dragging = true;
+ event.type = Common::EVENT_LBUTTONDOWN;
+ fillMouseEvent(event, curX, curY);
+ }
+ }
+ return true;
+}
+
+/**
+ * Handles mouse button release.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseButtonUp(SDL_Event &ev, Common::Event &event) {
+ if (motionPtrIndex == ev.button.which) {
+ motionPtrIndex = -1;
+
+ // When drag mode was active then simply send a mouse up event
+ if (dragging)
+ {
+ event.type = Common::EVENT_LBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ dragging = false;
+ return true;
+ }
+
+ // When mouse was moved 5 pixels or less then emulate a mouse button
+ // click.
+ if (ABS(dragDiffX) < 6 && ABS(dragDiffY) < 6)
+ {
+ int duration = getMillis() - screenDownTime;
+
+ // When screen was pressed for less than 500ms then emulate a
+ // left mouse click.
+ if (duration < 500) {
+ event.type = Common::EVENT_LBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ g_system->getEventManager()->pushEvent(event);
+ event.type = Common::EVENT_LBUTTONDOWN;
+ dragStartTime = getMillis();
+ }
+
+ // When screen was pressed for less than 1000ms then emulate a
+ // right mouse click.
+ else if (duration < 1000) {
+ event.type = Common::EVENT_RBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ g_system->getEventManager()->pushEvent(event);
+ event.type = Common::EVENT_RBUTTONDOWN;
+ }
+
+ // When screen was pressed for more than 1000ms then emulate a
+ // middle mouse click.
+ else {
+ event.type = Common::EVENT_MBUTTONUP;
+ fillMouseEvent(event, curX, curY);
+ g_system->getEventManager()->pushEvent(event);
+ event.type = Common::EVENT_MBUTTONDOWN;
+ }
+
+ }
+ }
+ return true;
+}
+
+/**
+ * Handles mouse motion.
+ *
+ * @param ev The SDL event
+ * @param event The ScummVM event.
+ * @return True if event was processed, false if not.
+ */
+bool WebOSSdlEventSource::handleMouseMotion(SDL_Event &ev, Common::Event &event) {
+ if (ev.motion.which == motionPtrIndex) {
+ int screenX = g_system->getWidth();
+ int screenY = g_system->getHeight();
+ curX = MIN(screenX, MAX(0, curX + ev.motion.xrel));
+ curY = MIN(screenY, MAX(0, curY + ev.motion.yrel));
+ dragDiffX += ev.motion.xrel;
+ dragDiffY += ev.motion.yrel;
+ event.type = Common::EVENT_MOUSEMOVE;
+ fillMouseEvent(event, curX, curY);
+ }
+ return true;
+}
+
+#endif
diff --git a/backends/events/webossdl/webossdl-events.h b/backends/events/webossdl/webossdl-events.h
new file mode 100644
index 0000000000..c925132d92
--- /dev/null
+++ b/backends/events/webossdl/webossdl-events.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#if !defined(BACKEND_EVENTS_SDL_WEBOS_H) && !defined(DISABLE_DEFAULT_EVENTMANAGER)
+#define BACKEND_EVENTS_SDL_WEBOS_H
+
+#include "backends/events/sdl/sdl-events.h"
+
+/**
+ * SDL events manager for WebOS
+ */
+class WebOSSdlEventSource : public SdlEventSource {
+protected:
+ virtual void SDLModToOSystemKeyFlags(SDLMod mod, Common::Event &event);
+ virtual bool handleKeyDown(SDL_Event &ev, Common::Event &event);
+ virtual bool handleKeyUp(SDL_Event &ev, Common::Event &event);
+ virtual bool handleMouseButtonDown(SDL_Event &ev, Common::Event &event);
+ virtual bool handleMouseButtonUp(SDL_Event &ev, Common::Event &event);
+ virtual bool handleMouseMotion(SDL_Event &ev, Common::Event &event);
+};
+
+#endif
diff --git a/backends/events/wincesdl/wincesdl-events.cpp b/backends/events/wincesdl/wincesdl-events.cpp
index 2505b0fb31..f15a416b76 100644
--- a/backends/events/wincesdl/wincesdl-events.cpp
+++ b/backends/events/wincesdl/wincesdl-events.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/events/wincesdl/wincesdl-events.h b/backends/events/wincesdl/wincesdl-events.h
index f5b1026c46..734cc899c0 100644
--- a/backends/events/wincesdl/wincesdl-events.h
+++ b/backends/events/wincesdl/wincesdl-events.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_EVENTS_SDL_WINCE_H
diff --git a/backends/fs/abstract-fs.cpp b/backends/fs/abstract-fs.cpp
index f110e862b7..372c7423dd 100644
--- a/backends/fs/abstract-fs.cpp
+++ b/backends/fs/abstract-fs.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 "backends/fs/abstract-fs.h"
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index bd591753e8..54e3958972 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 BACKENDS_ABSTRACT_FS_H
diff --git a/backends/fs/amigaos4/amigaos4-fs-factory.cpp b/backends/fs/amigaos4/amigaos4-fs-factory.cpp
index 2c7dc61278..a62b581f39 100644
--- a/backends/fs/amigaos4/amigaos4-fs-factory.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs-factory.cpp
@@ -17,14 +17,12 @@
* You should have received a copy of the GNU General Public 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$
*/
#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-factory.h b/backends/fs/amigaos4/amigaos4-fs-factory.h
index 89b3c7008d..0390e85072 100644
--- a/backends/fs/amigaos4/amigaos4-fs-factory.h
+++ b/backends/fs/amigaos4/amigaos4-fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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_FACTORY_H
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index 8a57a3cf1c..fe388c2a6e 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -17,103 +17,19 @@
* You should have received a copy of the GNU General Public 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$
*/
#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 +413,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..4e231330f0
--- /dev/null
+++ b/backends/fs/amigaos4/amigaos4-fs.h
@@ -0,0 +1,110 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#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/ds/ds-fs-factory.cpp b/backends/fs/ds/ds-fs-factory.cpp
index 2d4102eec6..3fd97d07eb 100644
--- a/backends/fs/ds/ds-fs-factory.cpp
+++ b/backends/fs/ds/ds-fs-factory.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
// Disable symbol overrides for FILE as that is used in FLAC headers
diff --git a/backends/fs/ds/ds-fs-factory.h b/backends/fs/ds/ds-fs-factory.h
index d23a997ee0..ed5804b94a 100644
--- a/backends/fs/ds/ds-fs-factory.h
+++ b/backends/fs/ds/ds-fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 DS_FILESYSTEM_FACTORY_H
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index 2308824d57..6c11ddc605 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides for FILE as that is used in FLAC headers
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index c891dac8f9..a6a6b97870 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -18,9 +18,6 @@
* 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 _DS_FS_H
diff --git a/backends/fs/fs-factory.h b/backends/fs/fs-factory.h
index cfa5b87edd..6d378955ec 100644
--- a/backends/fs/fs-factory.h
+++ b/backends/fs/fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 FILESYSTEM_FACTORY_H
diff --git a/backends/fs/n64/n64-fs-factory.cpp b/backends/fs/n64/n64-fs-factory.cpp
index 7e314693b8..7cabbf4f7a 100644
--- a/backends/fs/n64/n64-fs-factory.cpp
+++ b/backends/fs/n64/n64-fs-factory.cpp
@@ -17,17 +17,15 @@
* You should have received a copy of the GNU General Public 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$
*/
#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..5dec7c7eab 100644
--- a/backends/fs/n64/n64-fs-factory.h
+++ b/backends/fs/n64/n64-fs-factory.h
@@ -17,15 +17,11 @@
* You should have received a copy of the GNU General Public 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_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..d177cae9b4
--- /dev/null
+++ b/backends/fs/n64/n64-fs.h
@@ -0,0 +1,77 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef 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..ccff8a8b42 100644
--- a/backends/fs/posix/posix-fs-factory.cpp
+++ b/backends/fs/posix/posix-fs-factory.cpp
@@ -17,14 +17,18 @@
* You should have received a copy of the GNU General Public 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$
*/
-#if defined(UNIX)
+#if defined(POSIX)
+
+// 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-factory.h b/backends/fs/posix/posix-fs-factory.h
index 68c1fdd876..a7075db94c 100644
--- a/backends/fs/posix/posix-fs-factory.h
+++ b/backends/fs/posix/posix-fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 POSIX_FILESYSTEM_FACTORY_H
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index b218e9dd59..08a7601c17 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -17,12 +17,16 @@
* You should have received a copy of the GNU General Public 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$
*/
-#if defined(UNIX)
+#if defined(POSIX)
+
+// 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
+#define FORBIDDEN_SYMBOL_EXCEPTION_getenv
#include "backends/fs/posix/posix-fs.h"
#include "backends/fs/stdiostream.h"
@@ -238,11 +242,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)
+#endif //#if defined(POSIX)
diff --git a/backends/fs/posix/posix-fs.h b/backends/fs/posix/posix-fs.h
index 859e8973b3..e124829c02 100644
--- a/backends/fs/posix/posix-fs.h
+++ b/backends/fs/posix/posix-fs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 POSIX_FILESYSTEM_H
@@ -83,4 +80,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..cad92b5dec 100644
--- a/backends/fs/ps2/ps2-fs-factory.cpp
+++ b/backends/fs/ps2/ps2-fs-factory.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
#if defined(__PLAYSTATION2__)
@@ -28,7 +25,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 +40,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..9c6709cccf 100644
--- a/backends/fs/ps2/ps2-fs-factory.h
+++ b/backends/fs/ps2/ps2-fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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_FACTORY_H
@@ -39,9 +36,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..3a86cb3d9c 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -17,12 +17,16 @@
* You should have received a copy of the GNU General Public 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 "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 +44,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 +431,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..9323715c7f
--- /dev/null
+++ b/backends/fs/ps2/ps2-fs.h
@@ -0,0 +1,102 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef 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..ef1df246ba 100644
--- a/backends/fs/psp/psp-fs-factory.cpp
+++ b/backends/fs/psp/psp-fs-factory.cpp
@@ -17,14 +17,31 @@
* You should have received a copy of the GNU General Public 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$
*/
#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 +51,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 +63,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-factory.h b/backends/fs/psp/psp-fs-factory.h
index 36ecb8188b..aeaa9d6a87 100644
--- a/backends/fs/psp/psp-fs-factory.h
+++ b/backends/fs/psp/psp-fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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_FACTORY_H
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 16a0e9cd5b..67f4cd59a7 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -17,17 +17,34 @@
* You should have received a copy of the GNU General Public 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$
*/
-#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 +58,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..146debb5f1
--- /dev/null
+++ b/backends/fs/psp/psp-fs.h
@@ -0,0 +1,69 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#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/psp/psp-stream.cpp b/backends/fs/psp/psp-stream.cpp
index 10b80a0639..da5a46eedb 100644
--- a/backends/fs/psp/psp-stream.cpp
+++ b/backends/fs/psp/psp-stream.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
#ifdef __PSP__
diff --git a/backends/fs/psp/psp-stream.h b/backends/fs/psp/psp-stream.h
index d4497aa79f..395b27392d 100644
--- a/backends/fs/psp/psp-stream.h
+++ b/backends/fs/psp/psp-stream.h
@@ -18,9 +18,6 @@
* 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 PSPSTREAM_H_
diff --git a/backends/fs/stdiostream.cpp b/backends/fs/stdiostream.cpp
index d0600f41a6..7342df0029 100644
--- a/backends/fs/stdiostream.cpp
+++ b/backends/fs/stdiostream.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use FILE, fopen etc.
diff --git a/backends/fs/stdiostream.h b/backends/fs/stdiostream.h
index 25800f210a..1d45600d9c 100644
--- a/backends/fs/stdiostream.h
+++ b/backends/fs/stdiostream.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_FS_STDIOSTREAM_H
diff --git a/backends/fs/symbian/symbian-fs-factory.cpp b/backends/fs/symbian/symbian-fs-factory.cpp
index c70a67f339..7a60109742 100644
--- a/backends/fs/symbian/symbian-fs-factory.cpp
+++ b/backends/fs/symbian/symbian-fs-factory.cpp
@@ -17,14 +17,11 @@
* You should have received a copy of the GNU General Public 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$
*/
#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-factory.h b/backends/fs/symbian/symbian-fs-factory.h
index 2ad75b41ee..b99d3fb0ec 100644
--- a/backends/fs/symbian/symbian-fs-factory.h
+++ b/backends/fs/symbian/symbian-fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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_FACTORY_H
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 5d4951e269..fd74c8ca46 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -17,13 +17,11 @@
* You should have received a copy of the GNU General Public 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$
*/
#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 +33,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 +49,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 +71,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 +154,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 +172,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 +208,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..0db9a88940
--- /dev/null
+++ b/backends/fs/symbian/symbian-fs.h
@@ -0,0 +1,70 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#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/symbian/symbianstream.cpp b/backends/fs/symbian/symbianstream.cpp
index c926cc65f8..352595e25a 100644
--- a/backends/fs/symbian/symbianstream.cpp
+++ b/backends/fs/symbian/symbianstream.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/fs/symbian/symbianstream.h b/backends/fs/symbian/symbianstream.h
index 45117e0bf0..3ca612e39b 100644
--- a/backends/fs/symbian/symbianstream.h
+++ b/backends/fs/symbian/symbianstream.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_FS_SYMBIANSTDIOSTREAM_H
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..11679d0c36
--- /dev/null
+++ b/backends/fs/wii/wii-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.
+ */
+
+#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..46df253748 100644
--- a/backends/fs/windows/windows-fs-factory.cpp
+++ b/backends/fs/windows/windows-fs-factory.cpp
@@ -17,18 +17,15 @@
* You should have received a copy of the GNU General Public 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$
*/
+#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-factory.h b/backends/fs/windows/windows-fs-factory.h
index cb2b102538..e7c70f1b55 100644
--- a/backends/fs/windows/windows-fs-factory.h
+++ b/backends/fs/windows/windows-fs-factory.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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_FACTORY_H
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 00f72773c3..9e864753c9 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -17,28 +17,15 @@
* You should have received a copy of the GNU General Public 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$
*/
-#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 +42,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 +234,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..37d1e9099b
--- /dev/null
+++ b/backends/fs/windows/windows-fs.h
@@ -0,0 +1,120 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef 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/default-palette.h b/backends/graphics/default-palette.h
index 12436aae51..8f3fcb2db1 100644
--- a/backends/graphics/default-palette.h
+++ b/backends/graphics/default-palette.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_DEFAULT_PALETTE_H
diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
index 3c043ca986..6690244fb7 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -31,6 +28,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 +435,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/dinguxsdl/dinguxsdl-graphics.h b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
index dd21c8fa2b..9fb1170503 100644
--- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
+++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_SDL_DINGUX_H
diff --git a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
index 75a1f17674..6e5a35a1b1 100644
--- a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
+++ b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp
@@ -18,14 +18,11 @@
* 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/scummsys.h"
-#ifdef GP2X
+#if defined(GP2X_OLD)
#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
#include "graphics/scaler/aspect.h"
diff --git a/backends/graphics/gp2xsdl/gp2xsdl-graphics.h b/backends/graphics/gp2xsdl/gp2xsdl-graphics.h
index 6fb1a28a98..341b913acd 100644
--- a/backends/graphics/gp2xsdl/gp2xsdl-graphics.h
+++ b/backends/graphics/gp2xsdl/gp2xsdl-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_SDL_GP2X_H
diff --git a/backends/graphics/gph/gph-graphics.cpp b/backends/graphics/gph/gph-graphics.cpp
index 2f971f8da1..b407bf1faf 100644
--- a/backends/graphics/gph/gph-graphics.cpp
+++ b/backends/graphics/gph/gph-graphics.cpp
@@ -22,12 +22,13 @@
#include "common/scummsys.h"
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
#include "backends/graphics/gph/gph-graphics.h"
#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/graphics.h b/backends/graphics/graphics.h
index 953171d089..4e681eb155 100644
--- a/backends/graphics/graphics.h
+++ b/backends/graphics/graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_ABSTRACT_H
diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
index c2dcb7f587..42db89ee33 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -30,6 +27,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 +141,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/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
index 8124aca778..c428f00447 100644
--- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
+++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_SDL_LINUXMOTO_H
diff --git a/backends/graphics/null/null-graphics.h b/backends/graphics/null/null-graphics.h
index 2c15f56979..673d59814e 100644
--- a/backends/graphics/null/null-graphics.h
+++ b/backends/graphics/null/null-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_NULL_H
diff --git a/backends/graphics/opengl/glerrorcheck.cpp b/backends/graphics/opengl/glerrorcheck.cpp
index 9989a4cf9d..682207c7ef 100644
--- a/backends/graphics/opengl/glerrorcheck.cpp
+++ b/backends/graphics/opengl/glerrorcheck.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/graphics/opengl/glerrorcheck.h b/backends/graphics/opengl/glerrorcheck.h
index a94699ce1d..2d5491bdfd 100644
--- a/backends/graphics/opengl/glerrorcheck.h
+++ b/backends/graphics/opengl/glerrorcheck.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(DEBUG)
diff --git a/backends/graphics/opengl/gltexture.cpp b/backends/graphics/opengl/gltexture.cpp
index 7b7d40f174..3d1027b44f 100644
--- a/backends/graphics/opengl/gltexture.cpp
+++ b/backends/graphics/opengl/gltexture.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/graphics/opengl/gltexture.h b/backends/graphics/opengl/gltexture.h
index e7951a0c96..63d5e3a733 100644
--- a/backends/graphics/opengl/gltexture.h
+++ b/backends/graphics/opengl/gltexture.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#ifdef WIN32
@@ -42,9 +39,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..32c0fbca6f 100644
--- a/backends/graphics/opengl/opengl-graphics.cpp
+++ b/backends/graphics/opengl/opengl-graphics.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -32,6 +29,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 +353,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 +464,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 +517,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 +614,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 +697,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 +723,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 +739,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 +765,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 +1173,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 +1183,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 +1385,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..daba7748bc 100644
--- a/backends/graphics/opengl/opengl-graphics.h
+++ b/backends/graphics/opengl/opengl-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_OPENGL_H
@@ -28,7 +25,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..3f9ffc9f3e 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.cpp
+++ b/backends/graphics/openglsdl/openglsdl-graphics.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -30,6 +27,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 +485,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/openglsdl/openglsdl-graphics.h b/backends/graphics/openglsdl/openglsdl-graphics.h
index e9e5ed882d..ba9f94db2d 100644
--- a/backends/graphics/openglsdl/openglsdl-graphics.h
+++ b/backends/graphics/openglsdl/openglsdl-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_OPENGLSDL_H
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/samsungtvsdl/samsungtvsdl-graphics.cpp b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.cpp
new file mode 100644
index 0000000000..b929b5fe27
--- /dev/null
+++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.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.
+ *
+ */
+
+#include "backends/platform/samsungtv/samsungtv.h"
+#include "backends/events/samsungtvsdl/samsungtvsdl-events.h"
+#include "backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h"
+
+#if defined(SAMSUNGTV)
+
+SamsungTVSdlGraphicsManager::SamsungTVSdlGraphicsManager(SdlEventSource *sdlEventSource)
+ : SdlGraphicsManager(sdlEventSource) {
+}
+
+bool SamsungTVSdlGraphicsManager::hasFeature(OSystem::Feature f) {
+ return
+ (f == OSystem::kFeatureAspectRatioCorrection) ||
+ (f == OSystem::kFeatureCursorHasPalette);
+}
+
+void SamsungTVSdlGraphicsManager::setFeatureState(OSystem::Feature f, bool enable) {
+ switch (f) {
+ case OSystem::kFeatureAspectRatioCorrection:
+ SdlGraphicsManager::setFeatureState(f, enable);
+ break;
+ default:
+ break;
+ }
+}
+
+bool SamsungTVSdlGraphicsManager::getFeatureState(OSystem::Feature f) {
+ switch (f) {
+ case OSystem::kFeatureAspectRatioCorrection:
+ return SdlGraphicsManager::getFeatureState(f);
+ default:
+ return false;
+ }
+}
+
+#endif
diff --git a/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
new file mode 100644
index 0000000000..dc65c3a696
--- /dev/null
+++ b/backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h
@@ -0,0 +1,41 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef BACKENDS_GRAPHICS_SAMSUNGTV_H
+#define BACKENDS_GRAPHICS_SAMSUNGTV_H
+
+#if defined(SAMSUNGTV)
+
+#include "backends/graphics/sdl/sdl-graphics.h"
+
+class SamsungTVSdlGraphicsManager : public SdlGraphicsManager {
+public:
+ SamsungTVSdlGraphicsManager(SdlEventSource *sdlEventSource);
+
+ bool hasFeature(OSystem::Feature f);
+ void setFeatureState(OSystem::Feature f, bool enable);
+ bool getFeatureState(OSystem::Feature f);
+};
+
+#endif
+
+#endif
diff --git a/backends/graphics/sdl/sdl-graphics.cpp b/backends/graphics/sdl/sdl-graphics.cpp
index 67b979a830..7a5b777032 100644
--- a/backends/graphics/sdl/sdl-graphics.cpp
+++ b/backends/graphics/sdl/sdl-graphics.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -32,6 +29,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 +1285,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 +2052,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 +2276,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..86e52a0bf6 100644
--- a/backends/graphics/sdl/sdl-graphics.h
+++ b/backends/graphics/sdl/sdl-graphics.h
@@ -18,15 +18,13 @@
* 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 BACKENDS_GRAPHICS_SDL_H
#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/symbiansdl/symbiansdl-graphics.cpp b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
index d0c8728ce9..4d656cd7cd 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/graphics/symbiansdl/symbiansdl-graphics.h b/backends/graphics/symbiansdl/symbiansdl-graphics.h
index 54b871b265..1bad32a9b6 100644
--- a/backends/graphics/symbiansdl/symbiansdl-graphics.h
+++ b/backends/graphics/symbiansdl/symbiansdl-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_SYMBIAN_SDL_H
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.cpp b/backends/graphics/wincesdl/wincesdl-graphics.cpp
index 37c6624560..80b04ca56d 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.cpp
+++ b/backends/graphics/wincesdl/wincesdl-graphics.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -28,6 +25,7 @@
#ifdef _WIN32_WCE
#include "common/system.h"
+#include "common/textconsole.h"
#include "common/translation.h"
#include "common/mutex.h"
@@ -1162,16 +1160,16 @@ void WINCESdlGraphicsManager::adjustMouseEvent(const Common::Event &event) {
if (!event.synthetic) {
Common::Event newEvent(event);
newEvent.synthetic = true;
+ /*
if (!_overlayVisible) {
- /*
newEvent.mouse.x = newEvent.mouse.x * _scaleFactorXd / _scaleFactorXm;
newEvent.mouse.y = newEvent.mouse.y * _scaleFactorYd / _scaleFactorYm;
newEvent.mouse.x /= _videoMode.scaleFactor;
newEvent.mouse.y /= _videoMode.scaleFactor;
- */
if (_videoMode.aspectRatioCorrection)
newEvent.mouse.y = aspect2Real(newEvent.mouse.y);
}
+ */
g_system->getEventManager()->pushEvent(newEvent);
}
}
diff --git a/backends/graphics/wincesdl/wincesdl-graphics.h b/backends/graphics/wincesdl/wincesdl-graphics.h
index c8d683b158..b3a8d66f51 100644
--- a/backends/graphics/wincesdl/wincesdl-graphics.h
+++ b/backends/graphics/wincesdl/wincesdl-graphics.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_GRAPHICS_WINCE_SDL_H
diff --git a/backends/keymapper/action.cpp b/backends/keymapper/action.cpp
index aee4d80356..6ee506e7c3 100644
--- a/backends/keymapper/action.cpp
+++ b/backends/keymapper/action.cpp
@@ -18,9 +18,6 @@
* 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 "backends/keymapper/action.h"
diff --git a/backends/keymapper/action.h b/backends/keymapper/action.h
index 1ecc81757c..b15b3aaaad 100644
--- a/backends/keymapper/action.h
+++ b/backends/keymapper/action.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef COMMON_ACTION_H
diff --git a/backends/keymapper/hardware-key.h b/backends/keymapper/hardware-key.h
index 7c608a53fc..32df042525 100644
--- a/backends/keymapper/hardware-key.h
+++ b/backends/keymapper/hardware-key.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef COMMON_HARDWARE_KEY_H
@@ -31,6 +28,7 @@
#ifdef ENABLE_KEYMAPPER
#include "backends/keymapper/types.h"
+#include "common/textconsole.h"
namespace Common {
diff --git a/backends/keymapper/keymap.cpp b/backends/keymapper/keymap.cpp
index 93581c622d..1518cba693 100644
--- a/backends/keymapper/keymap.cpp
+++ b/backends/keymapper/keymap.cpp
@@ -18,9 +18,6 @@
* 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 "backends/keymapper/keymap.h"
diff --git a/backends/keymapper/keymap.h b/backends/keymapper/keymap.h
index add417b1a1..73f2293653 100644
--- a/backends/keymapper/keymap.h
+++ b/backends/keymapper/keymap.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef COMMON_KEYMAP_H
diff --git a/backends/keymapper/keymapper.cpp b/backends/keymapper/keymapper.cpp
index 557900adc1..f5f29a2940 100644
--- a/backends/keymapper/keymapper.cpp
+++ b/backends/keymapper/keymapper.cpp
@@ -18,9 +18,6 @@
* 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 "backends/keymapper/keymapper.h"
diff --git a/backends/keymapper/keymapper.h b/backends/keymapper/keymapper.h
index 475bde6474..fcb444aa64 100644
--- a/backends/keymapper/keymapper.h
+++ b/backends/keymapper/keymapper.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef COMMON_KEYMAPPER_H
diff --git a/backends/keymapper/remap-dialog.cpp b/backends/keymapper/remap-dialog.cpp
index 2f913055fc..7f2df2f0fe 100644
--- a/backends/keymapper/remap-dialog.cpp
+++ b/backends/keymapper/remap-dialog.cpp
@@ -17,15 +17,13 @@
* You should have received a copy of the GNU General Public 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 "backends/keymapper/remap-dialog.h"
#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..f587ae515d 100644
--- a/backends/keymapper/remap-dialog.h
+++ b/backends/keymapper/remap-dialog.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 REMAP_DIALOG_H
@@ -33,8 +30,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/keymapper/types.h b/backends/keymapper/types.h
index db3c33e490..ed2e498bd0 100644
--- a/backends/keymapper/types.h
+++ b/backends/keymapper/types.h
@@ -18,9 +18,6 @@
* 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 KEYMAPPER_TYPES_H
diff --git a/backends/log/log.cpp b/backends/log/log.cpp
index 3ba1d67b16..c02643b48b 100644
--- a/backends/log/log.cpp
+++ b/backends/log/log.cpp
@@ -18,9 +18,6 @@
* 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 "backends/log/log.h"
diff --git a/backends/log/log.h b/backends/log/log.h
index b869191541..8c95bfc435 100644
--- a/backends/log/log.h
+++ b/backends/log/log.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_LOG_LOG_H
diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp
index 2257f60e27..c006b6b6bf 100644
--- a/backends/midi/alsa.cpp
+++ b/backends/midi/alsa.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
// Disable symbol overrides so that we can use system headers.
@@ -30,6 +27,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"
@@ -165,7 +164,7 @@ int MidiDriver_ALSA::open() {
}
printf("Connected to Alsa sequencer client [%d:%d]\n", seq_client, seq_port);
- printf("ALSA client initialised [%d:0]\n", my_client);
+ printf("ALSA client initialized [%d:0]\n", my_client);
return 0;
}
@@ -181,6 +180,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 +258,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));
@@ -373,7 +382,7 @@ MusicDevices AlsaMusicPlugin::getDevices() const {
AlsaDevices alsaDevices = getAlsaDevices();
- // Since the default behaviour is to use the first device in the list,
+ // Since the default behavior is to use the first device in the list,
// try to put something sensible there. We used to have 17:0 and 65:0
// as defaults.
diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp
index ee3baaadd2..88973488ca 100644
--- a/backends/midi/camd.cpp
+++ b/backends/midi/camd.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
// Disable symbol overrides so that we can use system headers.
@@ -29,6 +26,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 +113,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 +144,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..305b462836 100644
--- a/backends/midi/coreaudio.cpp
+++ b/backends/midi/coreaudio.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
// Disable symbol overrides so that we can use system headers.
@@ -41,6 +38,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..1d61dceba2 100644
--- a/backends/midi/coremidi.cpp
+++ b/backends/midi/coremidi.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
// Disable symbol overrides so that we can use system headers.
@@ -30,6 +27,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..68e957f9aa 100644
--- a/backends/midi/dmedia.cpp
+++ b/backends/midi/dmedia.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
/*
@@ -34,9 +31,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..4efad9ceae 100644
--- a/backends/midi/seq.cpp
+++ b/backends/midi/seq.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
/*
@@ -35,6 +32,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/stmidi.cpp b/backends/midi/stmidi.cpp
index 42f829a7a3..53302f8a80 100644
--- a/backends/midi/stmidi.cpp
+++ b/backends/midi/stmidi.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
/*
diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp
index c01b9bbef7..87cd08659c 100644
--- a/backends/midi/timidity.cpp
+++ b/backends/midi/timidity.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
/*
@@ -41,13 +38,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 +557,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..828411cd22 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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$
*/
// Disable symbol overrides so that we can use system headers.
@@ -38,6 +35,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..526a01d1bf 100644
--- a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
+++ b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.cpp
@@ -18,12 +18,9 @@
* 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$
- *
*/
-#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/doublebuffersdl/doublebuffersdl-mixer.h b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h
index 6304c287df..c95294e2c0 100644
--- a/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h
+++ b/backends/mixer/doublebuffersdl/doublebuffersdl-mixer.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MIXER_DOUBLEBUFFERSDL_H
diff --git a/backends/mixer/sdl/sdl-mixer.cpp b/backends/mixer/sdl/sdl-mixer.cpp
index fa2bf3e232..61e7f051e5 100644
--- a/backends/mixer/sdl/sdl-mixer.cpp
+++ b/backends/mixer/sdl/sdl-mixer.cpp
@@ -18,16 +18,15 @@
* 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$
- *
*/
#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/sdl/sdl-mixer.h b/backends/mixer/sdl/sdl-mixer.h
index afb38f7f36..5590c90ab3 100644
--- a/backends/mixer/sdl/sdl-mixer.h
+++ b/backends/mixer/sdl/sdl-mixer.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MIXER_SDL_H
diff --git a/backends/mixer/symbiansdl/symbiansdl-mixer.cpp b/backends/mixer/symbiansdl/symbiansdl-mixer.cpp
index ef81b464ac..b2462a1cdf 100644
--- a/backends/mixer/symbiansdl/symbiansdl-mixer.cpp
+++ b/backends/mixer/symbiansdl/symbiansdl-mixer.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
#ifdef __SYMBIAN32__
diff --git a/backends/mixer/symbiansdl/symbiansdl-mixer.h b/backends/mixer/symbiansdl/symbiansdl-mixer.h
index 9164d95ba2..e3104e45eb 100644
--- a/backends/mixer/symbiansdl/symbiansdl-mixer.h
+++ b/backends/mixer/symbiansdl/symbiansdl-mixer.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MIXER_SYMBIAN_SDL_H
diff --git a/backends/mixer/wincesdl/wincesdl-mixer.cpp b/backends/mixer/wincesdl/wincesdl-mixer.cpp
index fb8a7d10c7..36ac310ad9 100644
--- a/backends/mixer/wincesdl/wincesdl-mixer.cpp
+++ b/backends/mixer/wincesdl/wincesdl-mixer.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
#ifdef _WIN32_WCE
@@ -32,14 +29,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/mixer/wincesdl/wincesdl-mixer.h b/backends/mixer/wincesdl/wincesdl-mixer.h
index 6c2f1efeee..8274d39d1c 100644
--- a/backends/mixer/wincesdl/wincesdl-mixer.h
+++ b/backends/mixer/wincesdl/wincesdl-mixer.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MIXER_WINCE_SDL_H
diff --git a/backends/modular-backend.cpp b/backends/modular-backend.cpp
index 19cba89af3..c5f147ffe1 100644
--- a/backends/modular-backend.cpp
+++ b/backends/modular-backend.cpp
@@ -18,20 +18,21 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_exit
+
#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()
:
@@ -278,3 +279,7 @@ FilesystemFactory *ModularBackend::getFilesystemFactory() {
assert(_fsFactory);
return _fsFactory;
}
+
+void ModularBackend::quit() {
+ exit(0);
+}
diff --git a/backends/modular-backend.h b/backends/modular-backend.h
index 863d9c2a81..e46fbfdd21 100644
--- a/backends/modular-backend.h
+++ b/backends/modular-backend.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MODULAR_BACKEND_H
@@ -151,8 +148,7 @@ public:
virtual Common::SaveFileManager *getSavefileManager();
virtual FilesystemFactory *getFilesystemFactory();
- virtual void quit() { exit(0); }
- virtual void setWindowCaption(const char *caption) {}
+ virtual void quit();
virtual void displayMessageOnOSD(const char *msg);
//@}
diff --git a/backends/module.mk b/backends/module.mk
index c562aea4b4..07a8cbbb3f 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -4,102 +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/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 POSIX
+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 \
@@ -107,8 +147,30 @@ MODULE_OBJS += \
timer/psp/timer.o
endif
+ifeq ($(BACKEND),samsungtv)
+MODULE_OBJS += \
+ events/samsungtvsdl/samsungtvsdl-events.o \
+ graphics/samsungtvsdl/samsungtvsdl-graphics.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 \
+ plugins/win32/win32-provider.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/mutex/mutex.h b/backends/mutex/mutex.h
index ddf27d5932..9cc16c7a2c 100644
--- a/backends/mutex/mutex.h
+++ b/backends/mutex/mutex.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MUTEX_ABSTRACT_H
diff --git a/backends/mutex/null/null-mutex.h b/backends/mutex/null/null-mutex.h
index 54b8f5ce96..fdb32b241c 100644
--- a/backends/mutex/null/null-mutex.h
+++ b/backends/mutex/null/null-mutex.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MUTEX_NULL_H
diff --git a/backends/mutex/sdl/sdl-mutex.cpp b/backends/mutex/sdl/sdl-mutex.cpp
index 90fd4c1497..8491ae468c 100644
--- a/backends/mutex/sdl/sdl-mutex.cpp
+++ b/backends/mutex/sdl/sdl-mutex.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/mutex/sdl/sdl-mutex.h b/backends/mutex/sdl/sdl-mutex.h
index 88a19d398a..914c2a19db 100644
--- a/backends/mutex/sdl/sdl-mutex.h
+++ b/backends/mutex/sdl/sdl-mutex.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_MUTEX_SDL_H
diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index bbfdb06b8d..eeeddb4c77 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -18,13 +18,27 @@
* 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$
- *
*/
#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 +46,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..752a31a4db 100644
--- a/backends/platform/android/android.h
+++ b/backends/platform/android/android.h
@@ -18,9 +18,6 @@
* 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 _ANDROID_H_
@@ -31,6 +28,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/android.mk b/backends/platform/android/android.mk
index 01ebf73a81..77fdb139d8 100644
--- a/backends/platform/android/android.mk
+++ b/backends/platform/android/android.mk
@@ -1,7 +1,7 @@
# Android specific build targets
# These must be incremented for each market upload
-#ANDROID_VERSIONCODE = 6 Specified in dists/android/AndroidManifest.xml.in
+ANDROID_VERSIONCODE = 6
ANDROID_PLUGIN_VERSIONCODE = 6
JAVA_FILES = \
@@ -72,7 +72,8 @@ PATH_GEN = $(PATH_GEN_TOP)/$(PATH_REL)
PATH_CLASSES_MAIN = $(PATH_BUILD_CLASSES_MAIN_TOP)/$(PATH_REL)
PATH_CLASSES_PLUGIN = $(PATH_BUILD_CLASSES_PLUGIN_TOP)/$(PATH_REL)
-FILE_MANIFEST = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST_SRC = $(srcdir)/dists/android/AndroidManifest.xml
+FILE_MANIFEST = $(PATH_BUILD)/AndroidManifest.xml
FILE_DEX = $(PATH_BUILD)/classes.dex
FILE_DEX_PLUGIN = $(PATH_BUILD)/plugins/classes.dex
FILE_RESOURCES = resources.ap_
@@ -87,6 +88,10 @@ CLASSES_PLUGIN = $(addprefix $(PATH_CLASSES_PLUGIN)/, $(JAVA_FILES_PLUGIN:%.java
APK_MAIN = scummvm.apk
APK_PLUGINS = $(patsubst plugins/lib%.so, scummvm-engine-%.apk, $(PLUGINS))
+$(FILE_MANIFEST): $(FILE_MANIFEST_SRC)
+ @$(MKDIR) -p $(@D)
+ sed "s/@ANDROID_VERSIONCODE@/$(ANDROID_VERSIONCODE)/" < $< > $@
+
$(SRC_GEN): $(FILE_MANIFEST) $(filter %.xml,$(RESOURCES)) $(ANDROID_JAR8)
@$(MKDIR) -p $(PATH_GEN_TOP)
$(AAPT) package -m -J $(PATH_GEN_TOP) -M $< -S $(PATH_RESOURCES) -I $(ANDROID_JAR8)
@@ -110,14 +115,13 @@ $(FILE_DEX_PLUGIN): $(CLASSES_PLUGIN)
@$(MKDIR) -p $(@D)
$(DX) --dex --output=$@ $(PATH_BUILD_CLASSES_PLUGIN_TOP)
-$(PATH_BUILD)/%/AndroidManifest.xml $(PATH_STAGE_PREFIX).%/res/values/strings.xml: $(PATH_DIST)/mkmanifest.pl $(srcdir)/configure $(PATH_DIST)/AndroidManifest.xml
- $(PATH_DIST)/mkmanifest.pl --id=$* --configure=$(srcdir)/configure \
- --version-name=$(VERSION) \
- --version-code=$(ANDROID_PLUGIN_VERSIONCODE) \
- --stringres=$(PATH_STAGE_PREFIX).$*/res/values/strings.xml \
- --manifest=$(PATH_BUILD)/$*/AndroidManifest.xml \
- --master-manifest=$(PATH_DIST)/AndroidManifest.xml \
- --unpacklib=mylib/armeabi/lib$*.so
+$(PATH_BUILD)/%/AndroidManifest.xml: $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $(PATH_DIST)/plugin-manifest.xml
+ @$(MKDIR) -p $(@D)
+ $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $* $(PATH_DIST)/plugin-manifest.xml $(ANDROID_PLUGIN_VERSIONCODE) $@
+
+$(PATH_STAGE_PREFIX).%/res/values/strings.xml: $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $(PATH_DIST)/plugin-manifest.xml
+ @$(MKDIR) -p $(@D)
+ $(PATH_DIST)/mkplugin.sh $(srcdir)/configure $* $(PATH_DIST)/plugin-strings.xml $(ANDROID_PLUGIN_VERSIONCODE) $@
$(PATH_STAGE_PREFIX).%/res/drawable/scummvm.png: $(PATH_RESOURCES)/drawable/scummvm.png
@$(MKDIR) -p $(@D)
diff --git a/backends/platform/android/asset-archive.cpp b/backends/platform/android/asset-archive.cpp
index 8e95029894..fe52a3d8d4 100644
--- a/backends/platform/android/asset-archive.cpp
+++ b/backends/platform/android/asset-archive.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if defined(__ANDROID__)
@@ -35,6 +32,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/asset-archive.h b/backends/platform/android/asset-archive.h
index 6ec86e4cd0..016e3e31a5 100644
--- a/backends/platform/android/asset-archive.h
+++ b/backends/platform/android/asset-archive.h
@@ -18,9 +18,6 @@
* 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 _ANDROID_ASSET_H_
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 09466b4d2f..cf1d4b173c 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -18,13 +18,27 @@
* 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$
- *
*/
#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 +458,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..89e918a34e 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -18,13 +18,27 @@
* 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$
- *
*/
#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"
@@ -165,7 +179,7 @@ void OSystem_Android::initSurface() {
JNI::initSurface();
- // Initialise OpenGLES context.
+ // Initialize OpenGLES context.
GLESTexture::initGLExtensions();
if (_game_texture)
@@ -628,13 +642,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..c4daf24e16 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -18,16 +18,32 @@
* 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$
- *
*/
#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/jni.h b/backends/platform/android/jni.h
index d029f1a2a8..1abecf0a37 100644
--- a/backends/platform/android/jni.h
+++ b/backends/platform/android/jni.h
@@ -18,9 +18,6 @@
* 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 _ANDROID_JNI_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..ef9f4cc1e0 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);
@@ -260,7 +260,7 @@ public abstract class ScummVM implements SurfaceHolder.Callback, Runnable {
if (_audio_track.getState() != AudioTrack.STATE_INITIALIZED)
throw new Exception(
- String.format("Error initialising AudioTrack: %d",
+ String.format("Error initializing AudioTrack: %d",
_audio_track.getState()));
}
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index a6b28ca485..e993ed6794 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -18,13 +18,27 @@
* 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$
- *
*/
#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 +161,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 +255,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 +271,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 +315,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 +387,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/android/texture.h b/backends/platform/android/texture.h
index 6344326259..dd34ba9d88 100644
--- a/backends/platform/android/texture.h
+++ b/backends/platform/android/texture.h
@@ -18,9 +18,6 @@
* 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 _ANDROID_TEXTURE_H_
diff --git a/backends/platform/dc/DCLauncherDialog.h b/backends/platform/dc/DCLauncherDialog.h
index 0ac7971847..72df3e15cc 100644
--- a/backends/platform/dc/DCLauncherDialog.h
+++ b/backends/platform/dc/DCLauncherDialog.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
class DCLauncherDialog {
diff --git a/backends/platform/dc/Makefile b/backends/platform/dc/Makefile
index 637f474b4b..0133ffd9e9 100644
--- a/backends/platform/dc/Makefile
+++ b/backends/platform/dc/Makefile
@@ -1,5 +1,3 @@
-# $URL$
-# $Id$
ronindir = /usr/local/ronin
@@ -65,7 +63,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/audio.cpp b/backends/platform/dc/audio.cpp
index ae63186d8c..1fee970a90 100644
--- a/backends/platform/dc/audio.cpp
+++ b/backends/platform/dc/audio.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h>
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index e21a12fa33..16547456c3 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -17,11 +17,10 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
#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..e31b817d7c 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -18,19 +18,20 @@
* 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 "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
@@ -52,7 +53,7 @@ class DCHardware {
};
class DCCDManager : public DefaultAudioCDManager {
- // Initialise the specified CD drive for audio playback.
+ // Initialize the specified CD drive for audio playback.
bool openCD(int drive);
// Poll cdrom status
@@ -69,7 +70,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 +255,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/dcloader.cpp b/backends/platform/dc/dcloader.cpp
index db0160b953..675f7ad8c7 100644
--- a/backends/platform/dc/dcloader.cpp
+++ b/backends/platform/dc/dcloader.cpp
@@ -18,9 +18,6 @@
* 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 <ronin/ronin.h>
diff --git a/backends/platform/dc/dcloader.h b/backends/platform/dc/dcloader.h
index 95b1376b0f..1782467acd 100644
--- a/backends/platform/dc/dcloader.h
+++ b/backends/platform/dc/dcloader.h
@@ -18,9 +18,6 @@
* 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 DC_DCLOADER_H
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index bbd4f994f7..dfce176e90 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -18,11 +18,13 @@
* 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$
- *
*/
+// 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 +35,6 @@
#include <common/config-manager.h>
#include <common/memstream.h>
-#include "backends/plugins/dc/dc-provider.h"
#include "audio/mixer_intern.h"
@@ -336,7 +337,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..56eef870c0 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#define RONIN_TIMER_ACCESS
@@ -720,7 +717,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..9d8a53e25a 100644
--- a/backends/platform/dc/dreamcast.mk
+++ b/backends/platform/dc/dreamcast.mk
@@ -1,5 +1,3 @@
-# $URL$
-# $Id$
ronindir = /usr/local/ronin
@@ -35,3 +33,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/icon.cpp b/backends/platform/dc/icon.cpp
index dc19214bed..cf7afc82e0 100644
--- a/backends/platform/dc/icon.cpp
+++ b/backends/platform/dc/icon.cpp
@@ -18,9 +18,6 @@
* 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 <ronin/ronin.h>
diff --git a/backends/platform/dc/icon.h b/backends/platform/dc/icon.h
index 41ff2da5fa..e412e67a84 100644
--- a/backends/platform/dc/icon.h
+++ b/backends/platform/dc/icon.h
@@ -18,9 +18,6 @@
* 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 DC_ICON_H
diff --git a/backends/platform/dc/input.cpp b/backends/platform/dc/input.cpp
index 5d4ed7ce96..7054ad196e 100644
--- a/backends/platform/dc/input.cpp
+++ b/backends/platform/dc/input.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#define RONIN_TIMER_ACCESS
#include <common/scummsys.h>
diff --git a/backends/platform/dc/label.cpp b/backends/platform/dc/label.cpp
index 5ad75cd20d..1094dd3fb4 100644
--- a/backends/platform/dc/label.cpp
+++ b/backends/platform/dc/label.cpp
@@ -18,9 +18,6 @@
* 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 <ronin/ronin.h>
diff --git a/backends/platform/dc/label.h b/backends/platform/dc/label.h
index 776a660a84..6b96175d29 100644
--- a/backends/platform/dc/label.h
+++ b/backends/platform/dc/label.h
@@ -18,9 +18,6 @@
* 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 DC_LABEL_H
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..fff3c147ec 100644
--- a/backends/plugins/dc/dc-provider.cpp
+++ b/backends/platform/dc/plugins.cpp
@@ -18,23 +18,54 @@
* 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/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 +90,7 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
+ drawPluginProgress(_filename);
_dlHandle = dlopen(_filename.c_str(), RTLD_LAZY);
if (!_dlHandle) {
@@ -85,11 +117,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 +130,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/portdefs.h b/backends/platform/dc/portdefs.h
index eaebc0f7da..ca2b5208a3 100644
--- a/backends/platform/dc/portdefs.h
+++ b/backends/platform/dc/portdefs.h
@@ -18,9 +18,6 @@
* 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 <sys/types.h>
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 8fd12d66bf..859f2a40ed 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include <common/scummsys.h>
#include <engines/engine.h>
#include <engines/metaengine.h>
diff --git a/backends/platform/dc/softkbd.cpp b/backends/platform/dc/softkbd.cpp
index 112eb0c1c0..076f826d1c 100644
--- a/backends/platform/dc/softkbd.cpp
+++ b/backends/platform/dc/softkbd.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h>
diff --git a/backends/platform/dc/softkbd.h b/backends/platform/dc/softkbd.h
index bedb9baaca..8f87d12baa 100644
--- a/backends/platform/dc/softkbd.h
+++ b/backends/platform/dc/softkbd.h
@@ -18,9 +18,6 @@
* 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 DC_SOFTKBD_H
diff --git a/backends/platform/dc/time.cpp b/backends/platform/dc/time.cpp
index c87062d583..c343852321 100644
--- a/backends/platform/dc/time.cpp
+++ b/backends/platform/dc/time.cpp
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#define RONIN_TIMER_ACCESS
diff --git a/backends/platform/dc/vmsave.cpp b/backends/platform/dc/vmsave.cpp
index 6c8289684f..f18f69efa6 100644
--- a/backends/platform/dc/vmsave.cpp
+++ b/backends/platform/dc/vmsave.cpp
@@ -18,11 +18,13 @@
* 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$
- *
*/
+// 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/dingux.cpp b/backends/platform/dingux/dingux.cpp
index 89a403d5ae..1af53aeae1 100644
--- a/backends/platform/dingux/dingux.cpp
+++ b/backends/platform/dingux/dingux.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if defined(DINGUX)
diff --git a/backends/platform/dingux/dingux.h b/backends/platform/dingux/dingux.h
index 2db2272f4f..2a07a8a46a 100644
--- a/backends/platform/dingux/dingux.h
+++ b/backends/platform/dingux/dingux.h
@@ -18,9 +18,6 @@
* 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 SDL_DINGUX_COMMON_H
diff --git a/backends/platform/dingux/main.cpp b/backends/platform/dingux/main.cpp
index c5dccc5f50..4fc67d874f 100644
--- a/backends/platform/dingux/main.cpp
+++ b/backends/platform/dingux/main.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/dingux/dingux.h"
@@ -30,8 +27,6 @@
#if defined(DINGUX)
-#include <unistd.h>
-
int main(int argc, char* argv[]) {
g_system = new OSystem_SDL_Dingux();
diff --git a/backends/platform/dingux/module.mk b/backends/platform/dingux/module.mk
index 2247625a04..b924fec1cf 100644
--- a/backends/platform/dingux/module.mk
+++ b/backends/platform/dingux/module.mk
@@ -4,8 +4,10 @@ MODULE_OBJS := \
main.o \
dingux.o
-MODULE_DIRS += \
- backends/platform/dingux/
+# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
+MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
+OBJS := $(MODULE_OBJS) $(OBJS)
+MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
-# We don't use the rules.mk here on purpose
-OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
+# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
+-include $(srcdir)/backends/platform/sdl/module.mk
diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp
index bcaaf8e936..6b5a0ec321 100644
--- a/backends/platform/ds/arm7/source/main.cpp
+++ b/backends/platform/ds/arm7/source/main.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
//////////////////////////////////////////////////////////////////////
diff --git a/backends/platform/ds/arm9/dist/readme_ds.txt b/backends/platform/ds/arm9/dist/readme_ds.txt
index ee1db719f4..24c85ad556 100644
--- a/backends/platform/ds/arm9/dist/readme_ds.txt
+++ b/backends/platform/ds/arm9/dist/readme_ds.txt
@@ -679,7 +679,7 @@ not supported.
Cdex can do the conversion very well and I recommend using it to convert
your audio files, although any CD ripping software can be used, so feel
-free to use your favourite program. The format you need to use is
+free to use your favorite program. The format you need to use is
IMA-ADPCM 4-bit Mono. You may use any sample rate. All other formats
will be rejected, including uncompressed WAV files.
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile
index 781738265c..65fb98ee0d 100644
--- a/backends/platform/ds/arm9/makefile
+++ b/backends/platform/ds/arm9/makefile
@@ -245,7 +245,7 @@ ifdef USE_MAD
DEFINES += -DUSE_MAD
endif
-DEFINES += -DREDUCE_MEMORY_USAGE -DDISABLE_DEBUGGER -DUSE_TEXT_CONSOLE -DDISABLE_MASS_ADD -DDISABLE_NES_APU
+DEFINES += -DREDUCE_MEMORY_USAGE -DDISABLE_DEBUGGER -DUSE_TEXT_CONSOLE_FOR_DEBUGGER -DDISABLE_MASS_ADD -DDISABLE_NES_APU
LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections
diff --git a/backends/platform/ds/arm9/source/adpcm_arm.s b/backends/platform/ds/arm9/source/adpcm_arm.s
index 56ffc360e8..4715346cb9 100644
--- a/backends/platform/ds/arm9/source/adpcm_arm.s
+++ b/backends/platform/ds/arm9/source/adpcm_arm.s
@@ -18,9 +18,6 @@
@ 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$
-@
@ @author Robin Watts (robin@wss.co.uk)
.global ARM_adpcm
diff --git a/backends/platform/ds/arm9/source/blitters.cpp b/backends/platform/ds/arm9/source/blitters.cpp
index 5d29672ef6..0076b302fd 100644
--- a/backends/platform/ds/arm9/source/blitters.cpp
+++ b/backends/platform/ds/arm9/source/blitters.cpp
@@ -18,9 +18,6 @@
* 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 "blitters.h"
diff --git a/backends/platform/ds/arm9/source/blitters.h b/backends/platform/ds/arm9/source/blitters.h
index 88506a4405..7700b4d68d 100644
--- a/backends/platform/ds/arm9/source/blitters.h
+++ b/backends/platform/ds/arm9/source/blitters.h
@@ -18,9 +18,6 @@
* 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 _BLITTERS_H_
diff --git a/backends/platform/ds/arm9/source/blitters_arm.s b/backends/platform/ds/arm9/source/blitters_arm.s
index aac39cc329..a5e071f7dd 100644
--- a/backends/platform/ds/arm9/source/blitters_arm.s
+++ b/backends/platform/ds/arm9/source/blitters_arm.s
@@ -18,9 +18,6 @@
@ 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$
-@
@ @author Robin Watts (robin@wss.co.uk)
@ .global timerTickHandler
diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp
index a69aedc91d..6612e0f2da 100644
--- a/backends/platform/ds/arm9/source/cdaudio.cpp
+++ b/backends/platform/ds/arm9/source/cdaudio.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides for FILE as that is used in FLAC headers
diff --git a/backends/platform/ds/arm9/source/cdaudio.h b/backends/platform/ds/arm9/source/cdaudio.h
index 7a85c97dbd..fc16f2f220 100644
--- a/backends/platform/ds/arm9/source/cdaudio.h
+++ b/backends/platform/ds/arm9/source/cdaudio.h
@@ -18,9 +18,6 @@
* 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 _CDAUDIO_H_
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index 303e504873..b3146cc16f 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
@@ -71,8 +68,7 @@
// - Try discworld?
-// Disable symbol overrides for FILE
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h
index bd627fa620..9c0d326292 100644
--- a/backends/platform/ds/arm9/source/dsmain.h
+++ b/backends/platform/ds/arm9/source/dsmain.h
@@ -18,9 +18,6 @@
* 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 _DSMAIN_H
diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp
index a693d2aee3..263ca58705 100644
--- a/backends/platform/ds/arm9/source/dsoptions.cpp
+++ b/backends/platform/ds/arm9/source/dsoptions.cpp
@@ -18,9 +18,6 @@
* 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 "dsoptions.h"
diff --git a/backends/platform/ds/arm9/source/dsoptions.h b/backends/platform/ds/arm9/source/dsoptions.h
index 8ba8e6e4da..9148060f4b 100644
--- a/backends/platform/ds/arm9/source/dsoptions.h
+++ b/backends/platform/ds/arm9/source/dsoptions.h
@@ -18,9 +18,6 @@
* 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 _DSOPTIONS_H_
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..76508a1664 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>
@@ -1007,7 +1010,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
dir.name[0] = FILE_FREE; // default to no file found
dir.attrib = 0x00;
- // Check if fat has been initialised
+ // Check if fat has been initialized
if (filesysBytePerSec == 0)
{
return (dir);
diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp
index 462138d335..db9b1c2609 100644
--- a/backends/platform/ds/arm9/source/gbampsave.cpp
+++ b/backends/platform/ds/arm9/source/gbampsave.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides for FILE
diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h
index caac0c0b28..492054dc52 100644
--- a/backends/platform/ds/arm9/source/gbampsave.h
+++ b/backends/platform/ds/arm9/source/gbampsave.h
@@ -18,9 +18,6 @@
* 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 _GBAMPSAVE_H_
diff --git a/backends/platform/ds/arm9/source/keys.h b/backends/platform/ds/arm9/source/keys.h
index 8d08014232..71c770dcd5 100644
--- a/backends/platform/ds/arm9/source/keys.h
+++ b/backends/platform/ds/arm9/source/keys.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
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..4ab2e36322 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
@@ -36,6 +33,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 +181,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/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h
index ad36503e83..580eb680eb 100644
--- a/backends/platform/ds/arm9/source/portdefs.h
+++ b/backends/platform/ds/arm9/source/portdefs.h
@@ -18,9 +18,6 @@
* 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 _PORTDEFS_H_
diff --git a/backends/platform/ds/arm9/source/scummhelp.cpp b/backends/platform/ds/arm9/source/scummhelp.cpp
index f1e8ba4fb2..670b46a3b9 100644
--- a/backends/platform/ds/arm9/source/scummhelp.cpp
+++ b/backends/platform/ds/arm9/source/scummhelp.cpp
@@ -18,9 +18,6 @@
* 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 "scummhelp.h"
diff --git a/backends/platform/ds/arm9/source/scummhelp.h b/backends/platform/ds/arm9/source/scummhelp.h
index 4be28dca6a..79103b35ed 100644
--- a/backends/platform/ds/arm9/source/scummhelp.h
+++ b/backends/platform/ds/arm9/source/scummhelp.h
@@ -18,9 +18,6 @@
* 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 _SCUMMHELP_H_
diff --git a/backends/platform/ds/arm9/source/touchkeyboard.h b/backends/platform/ds/arm9/source/touchkeyboard.h
index 7644e48bff..ae056e84da 100644
--- a/backends/platform/ds/arm9/source/touchkeyboard.h
+++ b/backends/platform/ds/arm9/source/touchkeyboard.h
@@ -18,9 +18,6 @@
* 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 _TOUCHKEYBOARD_H_
diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp
index a4fc2aed77..5f3b80c474 100644
--- a/backends/platform/ds/arm9/source/wordcompletion.cpp
+++ b/backends/platform/ds/arm9/source/wordcompletion.cpp
@@ -18,9 +18,6 @@
* 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 "wordcompletion.h"
diff --git a/backends/platform/ds/arm9/source/wordcompletion.h b/backends/platform/ds/arm9/source/wordcompletion.h
index 55a0bc8b5a..3d352f657a 100644
--- a/backends/platform/ds/arm9/source/wordcompletion.h
+++ b/backends/platform/ds/arm9/source/wordcompletion.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
namespace DS {
diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp
index d4f055ee82..49552a86b2 100644
--- a/backends/platform/ds/arm9/source/zipreader.cpp
+++ b/backends/platform/ds/arm9/source/zipreader.cpp
@@ -18,11 +18,9 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
#include "zipreader.h"
diff --git a/backends/platform/ds/arm9/source/zipreader.h b/backends/platform/ds/arm9/source/zipreader.h
index 5429954088..70f000eb4b 100644
--- a/backends/platform/ds/arm9/source/zipreader.h
+++ b/backends/platform/ds/arm9/source/zipreader.h
@@ -18,9 +18,6 @@
* 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 _ZIPREADER_H_
diff --git a/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h b/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
index cf6436634a..360b7b03dc 100644
--- a/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
+++ b/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 SCUMMVM_IPC_INCLUDE
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/gp2x/build/README-GP2X b/backends/platform/gp2x/build/README-GP2X
deleted file mode 100644
index 3c6591d369..0000000000
--- a/backends/platform/gp2x/build/README-GP2X
+++ /dev/null
@@ -1,54 +0,0 @@
-ScummVM - GP2X SPECIFIC README
-------------------------------------------------------------------------
-
-Contents:
-
- * About the backend/port <#About_the_backendport>
- * Supported audio options <#Supported_audio_options>
- * Credits <#Credits>
-
-------------------------------------------------------------------------
-
-Please refer to the:
-
-GP2X/GP2XWiz ScummVM Forum: <http://forums.scummvm.org/viewforum.php?f=14>
-WiKi: <http://wiki.scummvm.org/index.php/GP2X>
-
-for the most current information on the port and any updates to this
-documentation.
-
-The wiki includes detailed instructions on how to use the port and
-control information.
-
-------------------------------------------------------------------------
-About the backend/port
-
-This is the readme for the official GP2X ScummVM backend (also known as
-the GP2X port).
-
-This is an SVN test release of ScummVM for the GP2X, it would be
-appreciated if this SVN test distribution was not mirrored and that
-people be directed to http://scummvm.distant-earth.com/ instead for
-updated SVN builds.
-
-Full supported official releases of the GP2X ScummVM backend are made in
-line with main official releases and are avalalble from the ScummVM
-downloads page <http://www.scummvm.org/downloads.php>.
-
-------------------------------------------------------------------------
-Supported audio options
-
-Raw audio.
-MP3 audio.
-OGG Vorbis audio.
-
-FLAC audio is currently unsupported.
-
-For best results use uncompressed audio in games.
-
-------------------------------------------------------------------------
-Credits
-
-Core ScummVM code (c) The ScummVM Team
-Portions of the GP2X backend (c) John Willis
-Detailed (c) information can be found within the source code
diff --git a/backends/platform/gp2x/build/bundle.sh b/backends/platform/gp2x/build/bundle.sh
deleted file mode 100755
index d17f8bd831..0000000000
--- a/backends/platform/gp2x/build/bundle.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-echo Quick script to make building a distribution of the GP2X port more consistent.
-
-cd ../../../..
-
-echo Building ScummVM for GP2X Wiz.
-
-make gp2x-bundle
-
diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h
index 4d2a9c33cc..7efdd7164c 100644
--- a/backends/platform/gp2x/gp2x-common.h
+++ b/backends/platform/gp2x/gp2x-common.h
@@ -18,15 +18,16 @@
* 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 PLATFORM_SDL_GP2X_H
#define PLATFORM_SDL_GP2X_H
+#include "backends/base-backend.h"
+#include "backends/platform/sdl/sdl.h"
#include "backends/platform/sdl/posix/posix.h"
+#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
+#include "backends/events/gp2xsdl/gp2xsdl-events.h"
#ifndef PATH_MAX
#define PATH_MAX 255
@@ -34,12 +35,15 @@
class OSystem_GP2X : public OSystem_POSIX {
public:
- virtual void initBackend();
- virtual void quit();
- virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ OSystem_GP2X() {}
+
+ void initBackend();
+ void quit();
+ void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
+ void initSDL();
protected:
- virtual void initSDL();
+
};
#endif
diff --git a/backends/platform/gp2x/gp2x-hw.cpp b/backends/platform/gp2x/gp2x-hw.cpp
index 8818ff9fe9..074c668b5f 100644
--- a/backends/platform/gp2x/gp2x-hw.cpp
+++ b/backends/platform/gp2x/gp2x-hw.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
diff --git a/backends/platform/gp2x/gp2x-hw.h b/backends/platform/gp2x/gp2x-hw.h
index 872c44f118..3c66400124 100644
--- a/backends/platform/gp2x/gp2x-hw.h
+++ b/backends/platform/gp2x/gp2x-hw.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
diff --git a/backends/platform/gp2x/gp2x-main.cpp b/backends/platform/gp2x/gp2x-main.cpp
index a194accd77..f1ee5ed5f3 100644
--- a/backends/platform/gp2x/gp2x-main.cpp
+++ b/backends/platform/gp2x/gp2x-main.cpp
@@ -18,15 +18,13 @@
* 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 "backends/platform/gp2x/gp2x-common.h"
-#include "backends/plugins/posix/posix-provider.h"
+#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
+#if defined(GP2X)
int main(int argc, char *argv[]) {
// Create our OSystem instance
@@ -37,7 +35,7 @@ int main(int argc, char *argv[]) {
((OSystem_GP2X *)g_system)->init();
#ifdef DYNAMIC_MODULES
- PluginManager::instance().addPluginProvider(new POSIXPluginProvider());
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
#endif
// Invoke the actual ScummVM main entry point:
@@ -48,3 +46,5 @@ int main(int argc, char *argv[]) {
return res;
}
+
+#endif
diff --git a/backends/platform/gp2x/gp2x-mem.cpp b/backends/platform/gp2x/gp2x-mem.cpp
index 0968087cfd..8d22bf8130 100644
--- a/backends/platform/gp2x/gp2x-mem.cpp
+++ b/backends/platform/gp2x/gp2x-mem.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
diff --git a/backends/platform/gp2x/gp2x-mem.h b/backends/platform/gp2x/gp2x-mem.h
index aa49444164..b2cd00a587 100644
--- a/backends/platform/gp2x/gp2x-mem.h
+++ b/backends/platform/gp2x/gp2x-mem.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp
index 8ae54d679c..0e28a6b738 100644
--- a/backends/platform/gp2x/gp2x.cpp
+++ b/backends/platform/gp2x/gp2x.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
@@ -31,12 +28,11 @@
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
+#include "backends/platform/sdl/sdl-sys.h"
#include "backends/platform/gp2x/gp2x-common.h"
#include "backends/platform/gp2x/gp2x-hw.h"
#include "backends/platform/gp2x/gp2x-mem.h"
-#include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
-#include "backends/events/gp2xsdl/gp2xsdl-events.h"
#include "backends/saves/default/default-saves.h"
#include "common/config-manager.h"
@@ -129,7 +125,7 @@ void OSystem_GP2X::initBackend() {
ConfMan.setBool("FM_low_quality", true);
- /* Initialise any GP2X specific stuff we may want (Batt Status, scaler etc.) */
+ /* Initialize any GP2X specific stuff we may want (Batt Status, scaler etc.) */
GP2X_HW::deviceInit();
/* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */
@@ -143,7 +139,7 @@ void OSystem_GP2X::initBackend() {
if (_graphicsManager == 0)
_graphicsManager = new GP2XSdlGraphicsManager(_eventSource);
- // Call parent implementation of this method
+ /* Pass to POSIX method to do the heavy lifting */
OSystem_POSIX::initBackend();
}
diff --git a/backends/platform/gp2x/module.mk b/backends/platform/gp2x/module.mk
index 837ad99d7b..4846f162cb 100644
--- a/backends/platform/gp2x/module.mk
+++ b/backends/platform/gp2x/module.mk
@@ -10,3 +10,6 @@ MODULE_OBJS := \
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)
MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
+
+# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
+-include $(srcdir)/backends/platform/sdl/module.mk
diff --git a/backends/platform/gph/caanoo/build.sh b/backends/platform/gph/build/caanoo-build.sh
index 8000d2595d..8000d2595d 100755..100644
--- a/backends/platform/gph/caanoo/build.sh
+++ b/backends/platform/gph/build/caanoo-build.sh
diff --git a/backends/platform/gph/caanoo/bundle-debug.sh b/backends/platform/gph/build/caanoo-bundle-debug.sh
index 2d5cefe80e..2d5cefe80e 100755..100644
--- a/backends/platform/gph/caanoo/bundle-debug.sh
+++ b/backends/platform/gph/build/caanoo-bundle-debug.sh
diff --git a/backends/platform/gph/caanoo/bundle.sh b/backends/platform/gph/build/caanoo-bundle.sh
index 76fd31cec6..76fd31cec6 100755..100644
--- a/backends/platform/gph/caanoo/bundle.sh
+++ b/backends/platform/gph/build/caanoo-bundle.sh
diff --git a/backends/platform/gph/caanoo/config-alleng.sh b/backends/platform/gph/build/caanoo-config-alleng.sh
index 97fed942fa..97fed942fa 100755..100644
--- a/backends/platform/gph/caanoo/config-alleng.sh
+++ b/backends/platform/gph/build/caanoo-config-alleng.sh
diff --git a/backends/platform/gph/caanoo/config.sh b/backends/platform/gph/build/caanoo-config.sh
index 11d597481a..11d597481a 100755..100644
--- a/backends/platform/gph/caanoo/config.sh
+++ b/backends/platform/gph/build/caanoo-config.sh
diff --git a/backends/platform/gph/build/clean.sh b/backends/platform/gph/build/clean.sh
index 5ec1b9e62c..6d58b7a975 100755
--- a/backends/platform/gph/build/clean.sh
+++ b/backends/platform/gph/build/clean.sh
@@ -4,5 +4,5 @@ echo Quick script to make building all the time less painful.
cd ../../../..
-echo Cleaning ScummVM for the GP2X Wiz.
+echo Cleaning ScummVM for the GPH devices.
make clean
diff --git a/backends/platform/gp2x/build/build.sh b/backends/platform/gph/build/gp2x-build.sh
index 1ea77f4937..1ea77f4937 100755..100644
--- a/backends/platform/gp2x/build/build.sh
+++ b/backends/platform/gph/build/gp2x-build.sh
diff --git a/backends/platform/gph/build/gp2x-bundle.sh b/backends/platform/gph/build/gp2x-bundle.sh
new file mode 100644
index 0000000000..c4fe63ed9e
--- /dev/null
+++ b/backends/platform/gph/build/gp2x-bundle.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+echo Quick script to make building a distribution of the GP2X port more consistent.
+
+# Set the paths up here to support the build.
+
+export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin:$PATH
+export PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
+export CXX=arm-open2x-linux-g++
+export CC=arm-open2x-linux-gcc
+export CXXFLAGS=-march=armv4t
+export LDFLAGS=-static
+export ASFLAGS=-mfloat-abi=soft
+
+cd ../../../..
+
+echo Building ScummVM for GP2X Wiz.
+
+make gp2x-bundle
diff --git a/backends/platform/gp2x/build/config-alleng.sh b/backends/platform/gph/build/gp2x-config-alleng.sh
index 4a3526d50c..4a3526d50c 100755..100644
--- a/backends/platform/gp2x/build/config-alleng.sh
+++ b/backends/platform/gph/build/gp2x-config-alleng.sh
diff --git a/backends/platform/gp2x/build/config.sh b/backends/platform/gph/build/gp2x-config.sh
index e0a1bf1209..9092b0b1ea 100755..100644
--- a/backends/platform/gp2x/build/config.sh
+++ b/backends/platform/gph/build/gp2x-config.sh
@@ -17,7 +17,7 @@ export DEFINES=-DNDEBUG
# Edit the configure line to suit.
cd ../../../..
-./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd
+./configure --backend=gp2x --disable-mt32emu --host=gp2x --disable-flac --disable-nasm --disable-hq-scalers --with-sdl-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin --with-mpeg2-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-tremor --with-tremor-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-zlib --with-zlib-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-mad --with-mad-prefix=/opt/open2x/gcc-4.1.1-glibc-2.3.6 --enable-vkeybd --enable-plugins --default-dynamic
# --disable-release --enable-debug
# --enable-plugins --default-dynamic
diff --git a/backends/platform/gph/build/build.sh b/backends/platform/gph/build/gp2xwiz-build.sh
index 876c3e378a..876c3e378a 100755..100644
--- a/backends/platform/gph/build/build.sh
+++ b/backends/platform/gph/build/gp2xwiz-build.sh
diff --git a/backends/platform/gph/build/bundle-debug.sh b/backends/platform/gph/build/gp2xwiz-bundle-debug.sh
index cd5145b31d..cd5145b31d 100755..100644
--- a/backends/platform/gph/build/bundle-debug.sh
+++ b/backends/platform/gph/build/gp2xwiz-bundle-debug.sh
diff --git a/backends/platform/gph/build/bundle.sh b/backends/platform/gph/build/gp2xwiz-bundle.sh
index 579e2dc77b..579e2dc77b 100755..100644
--- a/backends/platform/gph/build/bundle.sh
+++ b/backends/platform/gph/build/gp2xwiz-bundle.sh
diff --git a/backends/platform/gph/build/config-alleng.sh b/backends/platform/gph/build/gp2xwiz-config-alleng.sh
index 9ec8a09cd2..9ec8a09cd2 100755..100644
--- a/backends/platform/gph/build/config-alleng.sh
+++ b/backends/platform/gph/build/gp2xwiz-config-alleng.sh
diff --git a/backends/platform/gph/build/config.sh b/backends/platform/gph/build/gp2xwiz-config.sh
index ac7c34ad12..ac7c34ad12 100755..100644
--- a/backends/platform/gph/build/config.sh
+++ b/backends/platform/gph/build/gp2xwiz-config.sh
diff --git a/backends/platform/gph/build/scummvm.png b/backends/platform/gph/build/scummvm.png
deleted file mode 100644
index 128e59efc4..0000000000
--- a/backends/platform/gph/build/scummvm.png
+++ /dev/null
Binary files differ
diff --git a/backends/platform/gph/caanoo-bundle.mk b/backends/platform/gph/caanoo-bundle.mk
index b7b3c9e188..8aabca9028 100755
--- a/backends/platform/gph/caanoo-bundle.mk
+++ b/backends/platform/gph/caanoo-bundle.mk
@@ -14,11 +14,11 @@ caanoo-bundle: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm.gpe $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/caanoo/scummvm.gpe $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -45,11 +45,11 @@ caanoo-bundle-debug: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/caanoo/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/caanoo/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
diff --git a/backends/platform/gph/caanoo/clean.sh b/backends/platform/gph/caanoo/clean.sh
deleted file mode 100755
index 5ec1b9e62c..0000000000
--- a/backends/platform/gph/caanoo/clean.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-echo Quick script to make building all the time less painful.
-
-cd ../../../..
-
-echo Cleaning ScummVM for the GP2X Wiz.
-make clean
diff --git a/backends/platform/gph/build/scummvm-gdb.gpe b/backends/platform/gph/devices/caanoo/scummvm-gdb.gpe
index 63ce193ca8..63ce193ca8 100755..100644
--- a/backends/platform/gph/build/scummvm-gdb.gpe
+++ b/backends/platform/gph/devices/caanoo/scummvm-gdb.gpe
diff --git a/backends/platform/gph/caanoo/scummvm.gpe b/backends/platform/gph/devices/caanoo/scummvm.gpe
index 37d0f65d18..37d0f65d18 100755..100644
--- a/backends/platform/gph/caanoo/scummvm.gpe
+++ b/backends/platform/gph/devices/caanoo/scummvm.gpe
diff --git a/backends/platform/gph/build/README-GPH b/backends/platform/gph/devices/common/README-GPH
index 64b9fcb76b..ea196f6649 100644
--- a/backends/platform/gph/build/README-GPH
+++ b/backends/platform/gph/devices/common/README-GPH
@@ -1,4 +1,4 @@
-ScummVM - GPH SPECIFIC README
+ScummVM - GPH DEVICE SPECIFIC README
------------------------------------------------------------------------
Contents:
@@ -29,7 +29,7 @@ control information.
About the backend/port
This is the readme for the official GPH ScummVM backend (also known as
-the GP2X port/GP2XWiz port and Caanoo port).
+the GP2X port/GP2XWiz port or Caanoo port).
This is an SVN test release of ScummVM for GPH devices, it would be
appreciated if this SVN test distribution was not mirrored and that
diff --git a/backends/platform/gph/build/scummvm.ini b/backends/platform/gph/devices/common/scummvm.ini
index c9cce92379..c9cce92379 100644
--- a/backends/platform/gph/build/scummvm.ini
+++ b/backends/platform/gph/devices/common/scummvm.ini
diff --git a/backends/platform/gp2x/build/scummvm.png b/backends/platform/gph/devices/common/scummvm.png
index 128e59efc4..128e59efc4 100644
--- a/backends/platform/gp2x/build/scummvm.png
+++ b/backends/platform/gph/devices/common/scummvm.png
Binary files differ
diff --git a/backends/platform/gph/build/scummvmb.png b/backends/platform/gph/devices/common/scummvmb.png
index 24a27bc0e1..24a27bc0e1 100644
--- a/backends/platform/gph/build/scummvmb.png
+++ b/backends/platform/gph/devices/common/scummvmb.png
Binary files differ
diff --git a/backends/platform/gp2x/mmuhack/Makefile b/backends/platform/gph/devices/gp2x/mmuhack/Makefile
index a35d5c2a98..a35d5c2a98 100644
--- a/backends/platform/gp2x/mmuhack/Makefile
+++ b/backends/platform/gph/devices/gp2x/mmuhack/Makefile
diff --git a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.h b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.h
index 520841ace7..520841ace7 100644
--- a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.h
+++ b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.h
diff --git a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.s b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.s
index 17628c156a..17628c156a 100644
--- a/backends/platform/gp2x/mmuhack/flush_uppermem_cache.s
+++ b/backends/platform/gph/devices/gp2x/mmuhack/flush_uppermem_cache.s
diff --git a/backends/platform/gp2x/mmuhack/mmuhack.c b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.c
index 7e27262e5f..2e38bdb284 100644
--- a/backends/platform/gp2x/mmuhack/mmuhack.c
+++ b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.c
@@ -18,9 +18,6 @@
* 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 <linux/config.h>
diff --git a/backends/platform/gp2x/build/mmuhack.o b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o
index 475f4a54ae..475f4a54ae 100644
--- a/backends/platform/gp2x/build/mmuhack.o
+++ b/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o
Binary files differ
diff --git a/backends/platform/gp2x/mmuhack/readme.txt b/backends/platform/gph/devices/gp2x/mmuhack/readme.txt
index bea49d7d6d..bea49d7d6d 100644
--- a/backends/platform/gp2x/mmuhack/readme.txt
+++ b/backends/platform/gph/devices/gp2x/mmuhack/readme.txt
diff --git a/backends/platform/gp2x/build/scummvm.gpe b/backends/platform/gph/devices/gp2x/scummvm.gpe
index c6b051831c..e8983aa2ce 100755..100644
--- a/backends/platform/gp2x/build/scummvm.gpe
+++ b/backends/platform/gph/devices/gp2x/scummvm.gpe
@@ -3,6 +3,10 @@
# Remount SD with forced Sync, does this really work?
mount -o sync,remount /dev/mmcsd/disc0/part1 /mnt/sd/
+# Export the location of any libs ScummVM depends on
+# (to avoid installing to the NAND and overwriting the broken ones there).
+export LD_LIBRARY_PATH=`pwd`/lib:$LD_LIBRARY_PATH
+
# Run ScummVM, important this bit.
./scummvm.gph
diff --git a/backends/platform/gph/caanoo/scummvm-gdb.gpe b/backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe
index 63ce193ca8..63ce193ca8 100755..100644
--- a/backends/platform/gph/caanoo/scummvm-gdb.gpe
+++ b/backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe
diff --git a/backends/platform/gph/build/scummvm.gpe b/backends/platform/gph/devices/gp2xwiz/scummvm.gpe
index 59ff562aeb..59ff562aeb 100755..100644
--- a/backends/platform/gph/build/scummvm.gpe
+++ b/backends/platform/gph/devices/gp2xwiz/scummvm.gpe
diff --git a/backends/platform/gp2x/gp2x-bundle.mk b/backends/platform/gph/gp2x-bundle.mk
index 67d22d1889..810ff8b8f0 100755..100644
--- a/backends/platform/gp2x/gp2x-bundle.mk
+++ b/backends/platform/gph/gp2x-bundle.mk
@@ -1,18 +1,21 @@
# Special target to create bundles for the GP2X.
bundle_name = release/scummvm-gp2x
+f=$(shell which $(STRIP))
+libloc = $(shell dirname $(f))
gp2x-bundle: $(EXECUTABLE)
$(MKDIR) "$(bundle_name)"
$(MKDIR) "$(bundle_name)/saves"
$(MKDIR) "$(bundle_name)/engine-data"
+ $(MKDIR) "$(bundle_name)/lib"
echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.png $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/README-GP2X $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/mmuhack.o $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/scummvm.gpe $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
@@ -27,6 +30,8 @@ ifdef DYNAMIC_MODULES
$(STRIP) $(bundle_name)/plugins/*
endif
+ $(CP) $(libloc)/../arm-open2x-linux/lib/libdl.so $(bundle_name)/lib/libdl.so
+
tar -C $(bundle_name) -cvjf $(bundle_name).tar.bz2 .
rm -R ./$(bundle_name)
@@ -37,10 +42,10 @@ gp2x-bundle-debug: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.gpe $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/scummvm.png $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/README-GP2X $(bundle_name)/
- $(CP) $(srcdir)/backends/platform/gp2x/build/mmuhack.o $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/scummvm.gpe $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2x/mmuhack/mmuhack.o $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/
@@ -54,6 +59,8 @@ ifdef DYNAMIC_MODULES
$(INSTALL) -c -m 644 $(PLUGINS) "$(bundle_name)/scummvm/plugins"
endif
+ $(CP) $(libloc)/../arm-open2x-linux/lib/libdl.so $(bundle_name)/lib/libdl.so
+
tar -C $(bundle_name) -cvjf $(bundle_name)-debug.tar.bz2 .
rm -R ./$(bundle_name)
diff --git a/backends/platform/gph/gp2xwiz-bundle.mk b/backends/platform/gph/gp2xwiz-bundle.mk
index df4cae7f4f..65e2952fde 100755
--- a/backends/platform/gph/gp2xwiz-bundle.mk
+++ b/backends/platform/gph/gp2xwiz-bundle.mk
@@ -1,6 +1,5 @@
# Special target to create bundles for the GP2X Wiz.
-#bundle_name = release/scummvm-wiz-`date '+%Y-%m-%d'`
bundle_name = release/scummvm-gp2xwiz
f=$(shell which $(STRIP))
libloc = $(shell dirname $(f))
@@ -14,11 +13,11 @@ gp2xwiz-bundle: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.gpe $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2xwiz/scummvm.gpe $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
@@ -48,11 +47,11 @@ gp2xwiz-bundle-debug: $(EXECUTABLE)
echo "Please put your save games in this dir" >> "$(bundle_name)/scummvm/saves/PUT_SAVES_IN_THIS_DIR"
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvmb.png $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/README-GPH $(bundle_name)/scummvm/
- $(CP) $(srcdir)/backends/platform/gph/build/scummvm.ini $(bundle_name)/
+ $(CP) $(srcdir)/backends/platform/gph/devices/gp2xwiz/scummvm-gdb.gpe $(bundle_name)/scummvm/scummvm.gpe
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvmb.png $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/README-GPH $(bundle_name)/scummvm/
+ $(CP) $(srcdir)/backends/platform/gph/devices/common/scummvm.ini $(bundle_name)/
$(INSTALL) -c -m 644 $(DIST_FILES_DOCS) $(bundle_name)/scummvm/
$(INSTALL) -c -m 644 $(DIST_FILES_THEMES) $(bundle_name)/scummvm/
diff --git a/backends/platform/gph/gph-backend.cpp b/backends/platform/gph/gph-backend.cpp
index 0432974246..cb52da441d 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];
@@ -133,7 +141,7 @@ void OSystem_GPH::initBackend() {
printf("%s\n", "Debug: STDOUT and STDERR redirected to text files.");
#endif /* DUMP_STDOUT */
- /* Initialise any GP2X Wiz specific stuff we may want (Batt Status, scaler etc.) */
+ /* Initialize any GP2X Wiz specific stuff we may want (Batt Status, scaler etc.) */
WIZ_HW::deviceInit();
/* Set Default hardware mixer volume to a preset level (VOLUME_INITIAL). This is done to 'reset' volume level if set by other apps. */
diff --git a/backends/platform/gph/gph-hw.cpp b/backends/platform/gph/gph-hw.cpp
index fa52526f01..2d70158001 100644
--- a/backends/platform/gph/gph-hw.cpp
+++ b/backends/platform/gph/gph-hw.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
diff --git a/backends/platform/gph/gph-hw.h b/backends/platform/gph/gph-hw.h
index 7276276608..0a1205156b 100644
--- a/backends/platform/gph/gph-hw.h
+++ b/backends/platform/gph/gph-hw.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
diff --git a/backends/platform/gph/gph-main.cpp b/backends/platform/gph/gph-main.cpp
index c7d691fc66..f91ec8f478 100644
--- a/backends/platform/gph/gph-main.cpp
+++ b/backends/platform/gph/gph-main.cpp
@@ -24,7 +24,7 @@
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
int main(int argc, char *argv[]) {
diff --git a/backends/platform/gph/gph-sdl.h b/backends/platform/gph/gph-sdl.h
index ef696bc3d8..68a641eed7 100644
--- a/backends/platform/gph/gph-sdl.h
+++ b/backends/platform/gph/gph-sdl.h
@@ -23,7 +23,7 @@
#ifndef GPH_H
#define GPH_H
-#if defined(GP2XWIZ) || defined(CAANOO)
+#if defined(GPH_DEVICE)
#include "backends/base-backend.h"
#include "backends/platform/sdl/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/gph/module.mk b/backends/platform/gph/module.mk
index a9951494d1..d8a1a6cd8d 100644
--- a/backends/platform/gph/module.mk
+++ b/backends/platform/gph/module.mk
@@ -11,4 +11,4 @@ OBJS := $(MODULE_OBJS) $(OBJS)
MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
--include $(srcdir)/backends/platform/sdl/module.mk \ No newline at end of file
+-include $(srcdir)/backends/platform/sdl/module.mk
diff --git a/backends/platform/iphone/blit.cpp b/backends/platform/iphone/blit.cpp
index c28f931983..58de22bf75 100644
--- a/backends/platform/iphone/blit.cpp
+++ b/backends/platform/iphone/blit.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/platform/iphone/blit_arm.h b/backends/platform/iphone/blit_arm.h
index 2a363630d8..77bb3578ab 100644
--- a/backends/platform/iphone/blit_arm.h
+++ b/backends/platform/iphone/blit_arm.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
extern "C" void blitLandscapeScreenRect16bpp(uint16 *dst, uint16 *src,
diff --git a/backends/platform/iphone/blit_arm.s b/backends/platform/iphone/blit_arm.s
index 417f3741cf..04f9a87614 100644
--- a/backends/platform/iphone/blit_arm.s
+++ b/backends/platform/iphone/blit_arm.s
@@ -18,9 +18,6 @@
@ 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$
-@
@ @author Robin Watts (robin@wss.co.uk)
.text
diff --git a/backends/platform/iphone/iphone_common.h b/backends/platform/iphone/iphone_common.h
index 7c7770f443..0cbcb77bcb 100644
--- a/backends/platform/iphone/iphone_common.h
+++ b/backends/platform/iphone/iphone_common.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
diff --git a/backends/platform/iphone/iphone_keyboard.h b/backends/platform/iphone/iphone_keyboard.h
index 5c17cc34b8..eecad09398 100644
--- a/backends/platform/iphone/iphone_keyboard.h
+++ b/backends/platform/iphone/iphone_keyboard.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#import <UIKit/UIKit.h>
diff --git a/backends/platform/iphone/iphone_keyboard.m b/backends/platform/iphone/iphone_keyboard.m
index 53c7376745..1624d02977 100644
--- a/backends/platform/iphone/iphone_keyboard.m
+++ b/backends/platform/iphone/iphone_keyboard.m
@@ -18,9 +18,6 @@
* 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$
- *
*/
#import "iphone_keyboard.h"
diff --git a/backends/platform/iphone/iphone_main.m b/backends/platform/iphone/iphone_main.m
index 1fb2cc3788..7bb5f0c317 100644
--- a/backends/platform/iphone/iphone_main.m
+++ b/backends/platform/iphone/iphone_main.m
@@ -18,9 +18,6 @@
* 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$
- *
*/
#import <UIKit/UIKit.h>
diff --git a/backends/platform/iphone/iphone_video.h b/backends/platform/iphone/iphone_video.h
index aed15ecfd5..8e0ffc19cb 100644
--- a/backends/platform/iphone/iphone_video.h
+++ b/backends/platform/iphone/iphone_video.h
@@ -18,9 +18,6 @@
* 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 _IPHONE_VIDEO__H
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 821d3de634..006603df64 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -18,9 +18,6 @@
* 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 "iphone_video.h"
@@ -178,13 +175,18 @@ const char* iPhone_getDocumentsDir() {
}
bool getLocalMouseCoords(CGPoint *point) {
- if (point->x < _screenRect.origin.x || point->x >= _screenRect.origin.x + _screenRect.size.width ||
- point->y < _screenRect.origin.y || point->y >= _screenRect.origin.y + _screenRect.size.height) {
- return false;
- }
+ if (_overlayIsEnabled) {
+ point->x = point->x / _overlayHeight;
+ point->y = point->y / _overlayWidth;
+ } else {
+ if (point->x < _screenRect.origin.x || point->x >= _screenRect.origin.x + _screenRect.size.width ||
+ point->y < _screenRect.origin.y || point->y >= _screenRect.origin.y + _screenRect.size.height) {
+ return false;
+ }
- point->x = (point->x - _screenRect.origin.x) / _screenRect.size.width;
- point->y = (point->y - _screenRect.origin.y) / _screenRect.size.height;
+ point->x = (point->x - _screenRect.origin.x) / _screenRect.size.width;
+ point->y = (point->y - _screenRect.origin.y) / _screenRect.size.height;
+ }
return true;
}
diff --git a/backends/platform/iphone/osys_events.cpp b/backends/platform/iphone/osys_events.cpp
index c30e34dd05..6e2a4b7e1e 100644
--- a/backends/platform/iphone/osys_events.cpp
+++ b/backends/platform/iphone/osys_events.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
@@ -31,6 +28,7 @@
#include "osys_main.h"
+static const int kQueuedInputEventDelay = 50;
bool OSystem_IPHONE::pollEvent(Common::Event &event) {
//printf("pollEvent()\n");
@@ -42,14 +40,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
_timerCallbackNext = curTime + _timerCallbackTimer;
}
- if (_needEventRestPeriod) {
- // Workaround: Some engines can't handle mouse-down and mouse-up events
- // appearing right after each other, without a call returning no input in between.
- _needEventRestPeriod = false;
- return false;
- }
-
- if (_queuedInputEvent.type != (Common::EventType)0) {
+ if (_queuedInputEvent.type != (Common::EventType)0 && curTime >= _queuedEventTime) {
event = _queuedInputEvent;
_queuedInputEvent.type = (Common::EventType)0;
return true;
@@ -194,7 +185,7 @@ bool OSystem_IPHONE::handleEvent_mouseUp(Common::Event &event, int x, int y) {
_queuedInputEvent.mouse.x = _mouseX;
_queuedInputEvent.mouse.y = _mouseY;
_lastMouseTap = getMillis();
- _needEventRestPeriod = true;
+ _queuedEventTime = _lastMouseTap + kQueuedInputEventDelay;
} else
return false;
}
@@ -235,7 +226,7 @@ bool OSystem_IPHONE::handleEvent_secondMouseUp(Common::Event &event, int x, int
event.kbd.flags = _queuedInputEvent.kbd.flags = 0;
event.kbd.keycode = _queuedInputEvent.kbd.keycode = Common::KEYCODE_ESCAPE;
event.kbd.ascii = _queuedInputEvent.kbd.ascii = Common::ASCII_ESCAPE;
- _needEventRestPeriod = true;
+ _queuedEventTime = curTime + kQueuedInputEventDelay;
_lastSecondaryTap = 0;
} else if (!_mouseClickAndDragEnabled) {
//printf("Rightclick!\n");
@@ -246,7 +237,7 @@ bool OSystem_IPHONE::handleEvent_secondMouseUp(Common::Event &event, int x, int
_queuedInputEvent.mouse.x = _mouseX;
_queuedInputEvent.mouse.y = _mouseY;
_lastSecondaryTap = curTime;
- _needEventRestPeriod = true;
+ _queuedEventTime = curTime + kQueuedInputEventDelay;
} else {
//printf("Right nothing!\n");
return false;
@@ -334,7 +325,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
event.kbd.flags = _queuedInputEvent.kbd.flags = 0;
event.kbd.keycode = _queuedInputEvent.kbd.keycode = Common::KEYCODE_F5;
event.kbd.ascii = _queuedInputEvent.kbd.ascii = Common::ASCII_F5;
- _needEventRestPeriod = true;
+ _queuedEventTime = getMillis() + kQueuedInputEventDelay;
return true;
}
@@ -463,7 +454,7 @@ void OSystem_IPHONE::handleEvent_keyPressed(Common::Event &event, int keyPresse
event.kbd.flags = _queuedInputEvent.kbd.flags = 0;
event.kbd.keycode = _queuedInputEvent.kbd.keycode = (Common::KeyCode)keyPressed;
event.kbd.ascii = _queuedInputEvent.kbd.ascii = ascii;
- _needEventRestPeriod = true;
+ _queuedEventTime = getMillis() + kQueuedInputEventDelay;
}
bool OSystem_IPHONE::handleEvent_swipe(Common::Event &event, int direction) {
@@ -530,7 +521,7 @@ bool OSystem_IPHONE::handleEvent_swipe(Common::Event &event, int direction) {
event.type = Common::EVENT_KEYDOWN;
_queuedInputEvent.type = Common::EVENT_KEYUP;
event.kbd.flags = _queuedInputEvent.kbd.flags = 0;
- _needEventRestPeriod = true;
+ _queuedEventTime = getMillis() + kQueuedInputEventDelay;
return true;
}
diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp
index 813adfbc43..12317ad935 100644
--- a/backends/platform/iphone/osys_main.cpp
+++ b/backends/platform/iphone/osys_main.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
@@ -58,9 +55,9 @@ void *OSystem_IPHONE::s_soundParam = NULL;
OSystem_IPHONE::OSystem_IPHONE() :
_savefile(NULL), _mixer(NULL), _timer(NULL), _offscreen(NULL),
_overlayVisible(false), _fullscreen(NULL),
- _mouseHeight(0), _mouseWidth(0), _mouseBuf(NULL), _lastMouseTap(0),
- _secondaryTapped(false), _lastSecondaryTap(0), _screenOrientation(kScreenOrientationFlippedLandscape),
- _needEventRestPeriod(false), _mouseClickAndDragEnabled(false),
+ _mouseHeight(0), _mouseWidth(0), _mouseBuf(NULL), _lastMouseTap(0), _queuedEventTime(0),
+ _secondaryTapped(false), _lastSecondaryTap(0),
+ _screenOrientation(kScreenOrientationFlippedLandscape), _mouseClickAndDragEnabled(false),
_gestureStartX(-1), _gestureStartY(-1), _fullScreenIsDirty(false), _fullScreenOverlayIsDirty(false),
_mouseDirty(false), _timeSuspended(0), _lastDragPosX(-1), _lastDragPosY(-1), _screenChangeCount(0),
_overlayHeight(0), _overlayWidth(0), _overlayBuffer(0)
diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 5e88510980..1ff87967a1 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -18,9 +18,6 @@
* 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 "graphics/surface.h"
@@ -30,6 +27,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,16 +79,16 @@ protected:
bool _mouseVisible;
byte *_mouseBuf;
- byte _mouseKeyColour;
+ byte _mouseKeyColor;
uint _mouseWidth, _mouseHeight;
uint _mouseX, _mouseY;
int _mouseHotspotX, _mouseHotspotY;
bool _mouseDirty;
long _lastMouseDown;
long _lastMouseTap;
+ long _queuedEventTime;
Common::Rect _lastDrawnMouseRect;
Common::Event _queuedInputEvent;
- bool _needEventRestPeriod;
bool _secondaryTapped;
long _lastSecondaryDown;
long _lastSecondaryTap;
diff --git a/backends/platform/iphone/osys_sound.cpp b/backends/platform/iphone/osys_sound.cpp
index cd364f57ac..405543e380 100644
--- a/backends/platform/iphone/osys_sound.cpp
+++ b/backends/platform/iphone/osys_sound.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/iphone/osys_video.cpp b/backends/platform/iphone/osys_video.cpp
index d67d38932a..263cbd2bcc 100644
--- a/backends/platform/iphone/osys_video.cpp
+++ b/backends/platform/iphone/osys_video.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
@@ -312,7 +309,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 +331,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 +494,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/linuxmoto/hardwarekeys.cpp b/backends/platform/linuxmoto/hardwarekeys.cpp
index a3fdd68c7f..e10e39a23d 100644
--- a/backends/platform/linuxmoto/hardwarekeys.cpp
+++ b/backends/platform/linuxmoto/hardwarekeys.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/linuxmoto/linuxmoto-sdl.h"
diff --git a/backends/platform/linuxmoto/linuxmoto-main.cpp b/backends/platform/linuxmoto/linuxmoto-main.cpp
index e9f2e661de..835ccb03ef 100644
--- a/backends/platform/linuxmoto/linuxmoto-main.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-main.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/linuxmoto/linuxmoto-sdl.h"
diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.cpp b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
index 3bee53cc9c..844bd19a83 100644
--- a/backends/platform/linuxmoto/linuxmoto-sdl.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/linuxmoto/linuxmoto-sdl.h"
diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.h b/backends/platform/linuxmoto/linuxmoto-sdl.h
index 78b9f81fd2..97262ccbca 100644
--- a/backends/platform/linuxmoto/linuxmoto-sdl.h
+++ b/backends/platform/linuxmoto/linuxmoto-sdl.h
@@ -18,9 +18,6 @@
* 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 PLATFORM_SDL_LINUXMOTO_H
diff --git a/backends/platform/linuxmoto/module.mk b/backends/platform/linuxmoto/module.mk
index c604d69da1..4c81aac3f2 100644
--- a/backends/platform/linuxmoto/module.mk
+++ b/backends/platform/linuxmoto/module.mk
@@ -10,5 +10,5 @@ MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)
MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
-# HACK: The linuxmoto backend is based on the SDL one, so we load that, too.
-include $(srcdir)/backends/platform/sdl/module.mk
+# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
+-include $(srcdir)/backends/platform/sdl/module.mk
diff --git a/backends/platform/n64/framfs_save_manager.cpp b/backends/platform/n64/framfs_save_manager.cpp
index 053ed741b3..983b9aba8d 100644
--- a/backends/platform/n64/framfs_save_manager.cpp
+++ b/backends/platform/n64/framfs_save_manager.cpp
@@ -18,9 +18,6 @@
* 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 <n64utils.h>
diff --git a/backends/platform/n64/framfs_save_manager.h b/backends/platform/n64/framfs_save_manager.h
index 376bdf1051..d50c17d85b 100644
--- a/backends/platform/n64/framfs_save_manager.h
+++ b/backends/platform/n64/framfs_save_manager.h
@@ -18,9 +18,6 @@
* 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 __FRAMFS_SAVE_MANAGER__
diff --git a/backends/platform/n64/nintendo64.cpp b/backends/platform/n64/nintendo64.cpp
index ff8e7485c9..3e811e73d2 100644
--- a/backends/platform/n64/nintendo64.cpp
+++ b/backends/platform/n64/nintendo64.cpp
@@ -18,9 +18,6 @@
* 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 "osys_n64.h"
diff --git a/backends/platform/n64/osys_n64.h b/backends/platform/n64/osys_n64.h
index 2daa41a9f6..8c0b34ce32 100644
--- a/backends/platform/n64/osys_n64.h
+++ b/backends/platform/n64/osys_n64.h
@@ -18,9 +18,6 @@
* 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 __OSYS_N64_H__
@@ -37,6 +34,7 @@
#include "graphics/surface.h"
#include "graphics/colormasks.h"
+#include "graphics/palette.h"
#include "graphics/pixelformat.h"
#include "audio/mixer_intern.h"
@@ -128,7 +126,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..094bb839d3 100644
--- a/backends/platform/n64/osys_n64_base.cpp
+++ b/backends/platform/n64/osys_n64_base.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include <romfs.h>
#include <malloc.h> // Required for memalign
@@ -32,6 +31,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 +91,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 +112,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 +126,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 +375,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 +384,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 +521,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 +533,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 +553,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 +611,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 +791,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 +908,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..2645cfea2a 100644
--- a/backends/platform/n64/osys_n64_events.cpp
+++ b/backends/platform/n64/osys_n64_events.cpp
@@ -18,9 +18,6 @@
* 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 <math.h> // Needed for "tan()" function
@@ -94,8 +91,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 +159,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/osys_n64_utilities.cpp b/backends/platform/n64/osys_n64_utilities.cpp
index 88a2970d7d..8d9f0471d3 100644
--- a/backends/platform/n64/osys_n64_utilities.cpp
+++ b/backends/platform/n64/osys_n64_utilities.cpp
@@ -18,9 +18,6 @@
* 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 "osys_n64.h"
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/n64/pakfs_save_manager.cpp b/backends/platform/n64/pakfs_save_manager.cpp
index 25d82826e5..df9baa4d21 100644
--- a/backends/platform/n64/pakfs_save_manager.cpp
+++ b/backends/platform/n64/pakfs_save_manager.cpp
@@ -18,9 +18,6 @@
* 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 <n64utils.h>
diff --git a/backends/platform/n64/pakfs_save_manager.h b/backends/platform/n64/pakfs_save_manager.h
index b0af464b3a..6987801294 100644
--- a/backends/platform/n64/pakfs_save_manager.h
+++ b/backends/platform/n64/pakfs_save_manager.h
@@ -18,9 +18,6 @@
* 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 __PAKFS_SAVE_MANAGER__
diff --git a/backends/platform/n64/portdefs.h b/backends/platform/n64/portdefs.h
index 9fd714ad9f..e62551355d 100644
--- a/backends/platform/n64/portdefs.h
+++ b/backends/platform/n64/portdefs.h
@@ -18,9 +18,6 @@
* 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_PORTDEFS__
diff --git a/backends/platform/null/null.cpp b/backends/platform/null/null.cpp
index 772b2b4722..b9e901bb5a 100644
--- a/backends/platform/null/null.cpp
+++ b/backends/platform/null/null.cpp
@@ -18,9 +18,6 @@
* 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 "backends/modular-backend.h"
@@ -37,7 +34,7 @@
*/
#if defined(__amigaos4__)
#include "backends/fs/amigaos4/amigaos4-fs-factory.h"
-#elif defined(UNIX)
+#elif defined(POSIX)
#include "backends/fs/posix/posix-fs-factory.h"
#elif defined(WIN32)
#include "backends/fs/windows/windows-fs-factory.h"
@@ -63,7 +60,7 @@ public:
OSystem_NULL::OSystem_NULL() {
#if defined(__amigaos4__)
_fsFactory = new AmigaOSFilesystemFactory();
- #elif defined(UNIX)
+ #elif defined(POSIX)
_fsFactory = new POSIXFilesystemFactory();
#elif defined(WIN32)
_fsFactory = new WindowsFilesystemFactory();
diff --git a/backends/platform/openpandora/module.mk b/backends/platform/openpandora/module.mk
index 8e60b87aa6..5bd568e1c4 100755
--- a/backends/platform/openpandora/module.mk
+++ b/backends/platform/openpandora/module.mk
@@ -5,11 +5,10 @@ MODULE_OBJS := \
op-backend.o \
op-main.o
-MODULE_DIRS += \
- backends/platform/openpandora/
-
-# We don't use the rules.mk here on purpose
-OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
+# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
+MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
+OBJS := $(MODULE_OBJS) $(OBJS)
+MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
-include $(srcdir)/backends/platform/sdl/module.mk
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-options.cpp b/backends/platform/openpandora/op-options.cpp
index f8711b868a..c60ba58cc7 100644
--- a/backends/platform/openpandora/op-options.cpp
+++ b/backends/platform/openpandora/op-options.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
diff --git a/backends/platform/openpandora/op-options.h b/backends/platform/openpandora/op-options.h
index 8c2bb1cc89..ebc83ca00c 100644
--- a/backends/platform/openpandora/op-options.h
+++ b/backends/platform/openpandora/op-options.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
/*
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/DmaPipe.cpp b/backends/platform/ps2/DmaPipe.cpp
index f3fbdb2c73..c6f6ab72ac 100644
--- a/backends/platform/ps2/DmaPipe.cpp
+++ b/backends/platform/ps2/DmaPipe.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// minimalistic gfx pipe implementation based on Vzzrzzn's GfxPipe.
diff --git a/backends/platform/ps2/DmaPipe.h b/backends/platform/ps2/DmaPipe.h
index 2b71747cc2..fd8f55c154 100644
--- a/backends/platform/ps2/DmaPipe.h
+++ b/backends/platform/ps2/DmaPipe.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
// minimalistic gfx pipe implementation based on Vzzrzzn's GfxPipe.
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index a460b919fd..332b2a3c03 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include "Gs2dScreen.h"
#include <kernel.h>
#include <malloc.h>
@@ -398,7 +397,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 +440,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..dffdce5b36 100644
--- a/backends/platform/ps2/Gs2dScreen.h
+++ b/backends/platform/ps2/Gs2dScreen.h
@@ -18,9 +18,6 @@
* 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 __GS2DSCREEN_H__
@@ -46,7 +43,7 @@ enum GsInterlace {
namespace Graphics {
- struct Surface;
+struct Surface;
}
class Gs2dScreen {
diff --git a/backends/platform/ps2/GsDefs.h b/backends/platform/ps2/GsDefs.h
index 515a2640bd..fab0c40b35 100644
--- a/backends/platform/ps2/GsDefs.h
+++ b/backends/platform/ps2/GsDefs.h
@@ -18,9 +18,6 @@
* 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 __GSDEFS_H__
diff --git a/backends/platform/ps2/asyncfio.cpp b/backends/platform/ps2/asyncfio.cpp
index f16efffbd9..d3d8eb65c7 100644
--- a/backends/platform/ps2/asyncfio.cpp
+++ b/backends/platform/ps2/asyncfio.cpp
@@ -18,9 +18,6 @@
* 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 "asyncfio.h"
diff --git a/backends/platform/ps2/asyncfio.h b/backends/platform/ps2/asyncfio.h
index b42141523b..26ee3f63dd 100644
--- a/backends/platform/ps2/asyncfio.h
+++ b/backends/platform/ps2/asyncfio.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#define MAX_HANDLES 32
diff --git a/backends/platform/ps2/eecodyvdfs.c b/backends/platform/ps2/eecodyvdfs.c
index 623e827623..e9d4bc6a5c 100644
--- a/backends/platform/ps2/eecodyvdfs.c
+++ b/backends/platform/ps2/eecodyvdfs.c
@@ -18,9 +18,6 @@
* 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 <tamtypes.h>
diff --git a/backends/platform/ps2/eecodyvdfs.h b/backends/platform/ps2/eecodyvdfs.h
index b9e2823cb9..4b383795c7 100644
--- a/backends/platform/ps2/eecodyvdfs.h
+++ b/backends/platform/ps2/eecodyvdfs.h
@@ -18,9 +18,6 @@
* 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 EECDVDFS_H
diff --git a/backends/platform/ps2/fileio.cpp b/backends/platform/ps2/fileio.cpp
index 1919d0f743..038cccd9dd 100644
--- a/backends/platform/ps2/fileio.cpp
+++ b/backends/platform/ps2/fileio.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/ps2/fileio.h b/backends/platform/ps2/fileio.h
index 4dee94c0a5..3fdee5f1dc 100644
--- a/backends/platform/ps2/fileio.h
+++ b/backends/platform/ps2/fileio.h
@@ -18,9 +18,6 @@
* 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 __PS2FILE_IO__
diff --git a/backends/platform/ps2/icon.cpp b/backends/platform/ps2/icon.cpp
index 48afc50c42..9852e6d40b 100644
--- a/backends/platform/ps2/icon.cpp
+++ b/backends/platform/ps2/icon.cpp
@@ -18,9 +18,6 @@
* 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 "Gs2dScreen.h"
diff --git a/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h b/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h
index a50a4a737c..e94e7dc8d6 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h
+++ b/backends/platform/ps2/iop/CoDyVDfs/common/codyvdirx.h
@@ -18,9 +18,6 @@
* 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 CDVDFS_COMMON_H
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h b/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h
index d8e0e96e59..ebf57328dd 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/cdtypes.h
@@ -18,9 +18,6 @@
* 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 __CDTYPES_H__
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
index b423b44a1d..77a5b93720 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
@@ -18,9 +18,6 @@
* 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 <types.h>
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h
index 68738a3222..902065f385 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.h
@@ -18,9 +18,6 @@
* 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 __CoDyVDfs_H__
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
index a64b2f2f3b..8aecece3d9 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
@@ -18,9 +18,6 @@
* 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 "cdtypes.h"
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.h b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.h
index e92576256c..d0aa9533f2 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.h
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.h
@@ -18,9 +18,6 @@
* 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 __FIOFS_H__
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/irx_imports.h b/backends/platform/ps2/iop/CoDyVDfs/iop/irx_imports.h
index 0f17d620f1..69bbc012f8 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/irx_imports.h
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/irx_imports.h
@@ -18,9 +18,6 @@
* 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 IOP_IRX_IMPORTS_H
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
index a9bfd636c7..3e45a5ff3d 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
@@ -18,9 +18,6 @@
* 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 <sifman.h>
diff --git a/backends/platform/ps2/iop/rpckbd/src/irx_imports.h b/backends/platform/ps2/iop/rpckbd/src/irx_imports.h
index c868c2d251..f7d0656bda 100644
--- a/backends/platform/ps2/iop/rpckbd/src/irx_imports.h
+++ b/backends/platform/ps2/iop/rpckbd/src/irx_imports.h
@@ -18,9 +18,6 @@
* 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 IOP_IRX_IMPORTS_H
diff --git a/backends/platform/ps2/irxboot.cpp b/backends/platform/ps2/irxboot.cpp
index 5ab7823e63..5072e8a52c 100644
--- a/backends/platform/ps2/irxboot.cpp
+++ b/backends/platform/ps2/irxboot.cpp
@@ -18,9 +18,6 @@
* 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 <kernel.h>
@@ -73,7 +70,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/irxboot.h b/backends/platform/ps2/irxboot.h
index 82ae06518c..ef1bfb1256 100644
--- a/backends/platform/ps2/irxboot.h
+++ b/backends/platform/ps2/irxboot.h
@@ -18,9 +18,6 @@
* 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 __IRXBOOT_H__
diff --git a/backends/platform/ps2/ps2debug.h b/backends/platform/ps2/ps2debug.h
index 8ef06cf150..127032ae80 100644
--- a/backends/platform/ps2/ps2debug.h
+++ b/backends/platform/ps2/ps2debug.h
@@ -18,9 +18,6 @@
* 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 __PS2DEBUG_H__
diff --git a/backends/platform/ps2/ps2input.cpp b/backends/platform/ps2/ps2input.cpp
index 964a773f7e..07104a6d97 100644
--- a/backends/platform/ps2/ps2input.cpp
+++ b/backends/platform/ps2/ps2input.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_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..c5d2f5b840 100644
--- a/backends/platform/ps2/ps2input.h
+++ b/backends/platform/ps2/ps2input.h
@@ -18,9 +18,6 @@
* 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 __PS2INPUT_H__
@@ -32,6 +29,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..75b3a15482 100644
--- a/backends/platform/ps2/ps2mutex.cpp
+++ b/backends/platform/ps2/ps2mutex.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_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..00512c40c3 100644
--- a/backends/platform/ps2/ps2pad.cpp
+++ b/backends/platform/ps2/ps2pad.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
#include <kernel.h>
#include <malloc.h>
#include <assert.h>
diff --git a/backends/platform/ps2/ps2pad.h b/backends/platform/ps2/ps2pad.h
index cf37a720e7..16c7c796d3 100644
--- a/backends/platform/ps2/ps2pad.h
+++ b/backends/platform/ps2/ps2pad.h
@@ -18,9 +18,6 @@
* 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 __PS2PAD_H__
diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp
index 4da8420478..2c3275b2b2 100644
--- a/backends/platform/ps2/ps2time.cpp
+++ b/backends/platform/ps2/ps2time.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_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..421edc3e2e 100644
--- a/backends/platform/ps2/savefilemgr.cpp
+++ b/backends/platform/ps2/savefilemgr.cpp
@@ -18,11 +18,12 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_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/savefilemgr.h b/backends/platform/ps2/savefilemgr.h
index a87f53d80c..a25fb063ae 100644
--- a/backends/platform/ps2/savefilemgr.h
+++ b/backends/platform/ps2/savefilemgr.h
@@ -18,9 +18,6 @@
* 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 __SAVEFILEMGR_H__
diff --git a/backends/platform/ps2/sysdefs.h b/backends/platform/ps2/sysdefs.h
index 4aef58b4bd..0114402233 100644
--- a/backends/platform/ps2/sysdefs.h
+++ b/backends/platform/ps2/sysdefs.h
@@ -18,9 +18,6 @@
* 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 __SYSDEFS_H__
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index 77de74eb5b..210454c9aa 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
@@ -568,6 +565,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 +729,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..b21a56c184 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -18,9 +18,6 @@
* 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 SYSTEMPS2_H
@@ -28,6 +25,7 @@
#include "common/system.h"
#include "backends/base-backend.h"
+#include "graphics/palette.h"
class DefaultTimerManager;
class DefaultSaveFileManager;
@@ -47,11 +45,11 @@ struct Ps2Mutex {
};
namespace Common {
- class TimerManager;
+class TimerManager;
};
namespace Audio {
- class MixerImpl;
+class MixerImpl;
};
class OSystem_PS2 : public BaseBackend, public PaletteManager {
@@ -78,9 +76,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/Makefile b/backends/platform/psp/Makefile
index dab3c34b51..899bf37e80 100644
--- a/backends/platform/psp/Makefile
+++ b/backends/platform/psp/Makefile
@@ -1,6 +1,4 @@
# SCUMMVM-PSP MakeFile
-# $URL$
-# $Id$
#Use only this section to modify how the makefile behaves ------------
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/audio.cpp b/backends/platform/psp/audio.cpp
index b5a72dccd0..4fab9fdd3f 100644
--- a/backends/platform/psp/audio.cpp
+++ b/backends/platform/psp/audio.cpp
@@ -18,9 +18,6 @@
* 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 <pspthreadman.h>
diff --git a/backends/platform/psp/audio.h b/backends/platform/psp/audio.h
index f5179028dc..34ded5c638 100644
--- a/backends/platform/psp/audio.h
+++ b/backends/platform/psp/audio.h
@@ -18,9 +18,6 @@
* 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_AUDIO_H
diff --git a/backends/platform/psp/cursor.cpp b/backends/platform/psp/cursor.cpp
index cf879e095a..18a61f3df4 100644
--- a/backends/platform/psp/cursor.cpp
+++ b/backends/platform/psp/cursor.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -327,8 +324,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/cursor.h b/backends/platform/psp/cursor.h
index 15dcf21dd3..9c24d001fb 100644
--- a/backends/platform/psp/cursor.h
+++ b/backends/platform/psp/cursor.h
@@ -18,9 +18,6 @@
* 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 MOUSE_H
diff --git a/backends/platform/psp/default_display_client.cpp b/backends/platform/psp/default_display_client.cpp
index bb42406c3e..2ee7ff5b74 100644
--- a/backends/platform/psp/default_display_client.cpp
+++ b/backends/platform/psp/default_display_client.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -199,7 +196,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/default_display_client.h b/backends/platform/psp/default_display_client.h
index c7189b0168..e1cd8e7e72 100644
--- a/backends/platform/psp/default_display_client.h
+++ b/backends/platform/psp/default_display_client.h
@@ -18,9 +18,6 @@
* 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_DEF_DISPLAY_CLIENT_H
diff --git a/backends/platform/psp/display_client.cpp b/backends/platform/psp/display_client.cpp
index 76b4a28e4a..14b96d9cae 100644
--- a/backends/platform/psp/display_client.cpp
+++ b/backends/platform/psp/display_client.cpp
@@ -18,11 +18,22 @@
* 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$
- *
*/
+// 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/display_client.h b/backends/platform/psp/display_client.h
index 0e43266031..f190658a26 100644
--- a/backends/platform/psp/display_client.h
+++ b/backends/platform/psp/display_client.h
@@ -18,9 +18,6 @@
* 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_GRAPHICS_H
diff --git a/backends/platform/psp/display_manager.cpp b/backends/platform/psp/display_manager.cpp
index 471303796b..899b79727f 100644
--- a/backends/platform/psp/display_manager.cpp
+++ b/backends/platform/psp/display_manager.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include <pspgu.h>
#include <pspdisplay.h>
#include <pspthreadman.h>
diff --git a/backends/platform/psp/display_manager.h b/backends/platform/psp/display_manager.h
index 4ebd98b524..5176bee3fe 100644
--- a/backends/platform/psp/display_manager.h
+++ b/backends/platform/psp/display_manager.h
@@ -18,9 +18,6 @@
* 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_DISPLAY_MAN_H
diff --git a/backends/platform/psp/dummy.cpp b/backends/platform/psp/dummy.cpp
index a5c887f85d..86ab30b3e2 100644
--- a/backends/platform/psp/dummy.cpp
+++ b/backends/platform/psp/dummy.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/platform/psp/image_viewer.cpp b/backends/platform/psp/image_viewer.cpp
index e28fc28c6e..97d582b63a 100644
--- a/backends/platform/psp/image_viewer.cpp
+++ b/backends/platform/psp/image_viewer.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/psp/image_viewer.h b/backends/platform/psp/image_viewer.h
index a70a4dd4e2..4c3eaf7b4a 100644
--- a/backends/platform/psp/image_viewer.h
+++ b/backends/platform/psp/image_viewer.h
@@ -18,9 +18,6 @@
* 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_IMAGE_VIEWER_H
diff --git a/backends/platform/psp/input.cpp b/backends/platform/psp/input.cpp
index 665f41504f..17f8954e3b 100644
--- a/backends/platform/psp/input.cpp
+++ b/backends/platform/psp/input.cpp
@@ -18,9 +18,6 @@
* 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 <pspctrl.h>
diff --git a/backends/platform/psp/input.h b/backends/platform/psp/input.h
index 8c872f50e5..8315a3766c 100644
--- a/backends/platform/psp/input.h
+++ b/backends/platform/psp/input.h
@@ -18,9 +18,6 @@
* 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_INPUT_H
diff --git a/backends/platform/psp/memory.cpp b/backends/platform/psp/memory.cpp
index b9380cbdc6..5419d60eb3 100644
--- a/backends/platform/psp/memory.cpp
+++ b/backends/platform/psp/memory.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/platform/psp/memory.h b/backends/platform/psp/memory.h
index c4a4b752f8..b5e29af634 100644
--- a/backends/platform/psp/memory.h
+++ b/backends/platform/psp/memory.h
@@ -19,9 +19,6 @@
* 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_MEMORY_H
diff --git a/backends/platform/psp/mp3.cpp b/backends/platform/psp/mp3.cpp
index 54476dabfd..266e31e445 100644
--- a/backends/platform/psp/mp3.cpp
+++ b/backends/platform/psp/mp3.cpp
@@ -18,17 +18,28 @@
* 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$
- *
*/
+// 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..8b01fe4872 100644
--- a/backends/platform/psp/mp3.h
+++ b/backends/platform/psp/mp3.h
@@ -18,9 +18,6 @@
* 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 SOUND_MP3_PSP_H
@@ -30,7 +27,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..3db743eff3 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -18,11 +18,11 @@
* 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$
- *
*/
+// 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..00eec3da90 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -18,9 +18,6 @@
* 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 OSYS_PSP_H
@@ -29,6 +26,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/png_loader.cpp b/backends/platform/psp/png_loader.cpp
index 08f370f36d..2f4857569e 100644
--- a/backends/platform/psp/png_loader.cpp
+++ b/backends/platform/psp/png_loader.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/psp/png_loader.h b/backends/platform/psp/png_loader.h
index 4119bfef2b..616a79405e 100644
--- a/backends/platform/psp/png_loader.h
+++ b/backends/platform/psp/png_loader.h
@@ -18,9 +18,6 @@
* 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_PNG_IMAGE_H
diff --git a/backends/platform/psp/portdefs.h b/backends/platform/psp/portdefs.h
index bf7ed41e25..feb0c944ee 100644
--- a/backends/platform/psp/portdefs.h
+++ b/backends/platform/psp/portdefs.h
@@ -18,14 +18,17 @@
* 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 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/powerman.cpp b/backends/platform/psp/powerman.cpp
index f00a2c0fde..fe9dcfa673 100644
--- a/backends/platform/psp/powerman.cpp
+++ b/backends/platform/psp/powerman.cpp
@@ -18,9 +18,6 @@
* 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 <psppower.h>
diff --git a/backends/platform/psp/powerman.h b/backends/platform/psp/powerman.h
index 5f09bc7794..e62b1ada8e 100644
--- a/backends/platform/psp/powerman.h
+++ b/backends/platform/psp/powerman.h
@@ -18,9 +18,6 @@
* 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 POWERMAN_H
diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp
index d24c614e33..f45000fea4 100644
--- a/backends/platform/psp/psp_main.cpp
+++ b/backends/platform/psp/psp_main.cpp
@@ -18,11 +18,22 @@
* 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$
- *
*/
+// 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/pspkeyboard.cpp b/backends/platform/psp/pspkeyboard.cpp
index f210726692..43c4cada15 100644
--- a/backends/platform/psp/pspkeyboard.cpp
+++ b/backends/platform/psp/pspkeyboard.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/psp/pspkeyboard.h b/backends/platform/psp/pspkeyboard.h
index ebf21cfd54..bd270da26f 100644
--- a/backends/platform/psp/pspkeyboard.h
+++ b/backends/platform/psp/pspkeyboard.h
@@ -18,9 +18,6 @@
* 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 PSPKEYBOARD_H
diff --git a/backends/platform/psp/psppixelformat.cpp b/backends/platform/psp/psppixelformat.cpp
index 598cf74256..e1649791a1 100644
--- a/backends/platform/psp/psppixelformat.cpp
+++ b/backends/platform/psp/psppixelformat.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/platform/psp/psppixelformat.h b/backends/platform/psp/psppixelformat.h
index 95ec5e385b..ca85e76211 100644
--- a/backends/platform/psp/psppixelformat.h
+++ b/backends/platform/psp/psppixelformat.h
@@ -18,9 +18,6 @@
* 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_PIXEL_FORMAT_H
diff --git a/backends/platform/psp/rtc.cpp b/backends/platform/psp/rtc.cpp
index ff2af8573c..3d6d4295a6 100644
--- a/backends/platform/psp/rtc.cpp
+++ b/backends/platform/psp/rtc.cpp
@@ -18,9 +18,6 @@
* 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 <time.h>
diff --git a/backends/platform/psp/rtc.h b/backends/platform/psp/rtc.h
index 0a7f7ea2e9..45885c3e66 100644
--- a/backends/platform/psp/rtc.h
+++ b/backends/platform/psp/rtc.h
@@ -18,9 +18,6 @@
* 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_RTC_H_
diff --git a/backends/platform/psp/tests.cpp b/backends/platform/psp/tests.cpp
index 972e785555..4d326f30bd 100644
--- a/backends/platform/psp/tests.cpp
+++ b/backends/platform/psp/tests.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// PSP speed and unit tests. Activate in tests.h
diff --git a/backends/platform/psp/tests.h b/backends/platform/psp/tests.h
index 70ec1f3ff1..9d158812f9 100644
--- a/backends/platform/psp/tests.h
+++ b/backends/platform/psp/tests.h
@@ -18,9 +18,6 @@
* 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_TESTS_H_
diff --git a/backends/platform/psp/thread.cpp b/backends/platform/psp/thread.cpp
index 3e1303a4e6..5f38a54ab7 100644
--- a/backends/platform/psp/thread.cpp
+++ b/backends/platform/psp/thread.cpp
@@ -18,9 +18,6 @@
* 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 <pspthreadman.h>
diff --git a/backends/platform/psp/thread.h b/backends/platform/psp/thread.h
index 1ca6ef5c42..a2f3b5eda2 100644
--- a/backends/platform/psp/thread.h
+++ b/backends/platform/psp/thread.h
@@ -18,9 +18,6 @@
* 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_THREAD_H
diff --git a/backends/platform/psp/trace.cpp b/backends/platform/psp/trace.cpp
index 74c2f64300..373e00415b 100644
--- a/backends/platform/psp/trace.cpp
+++ b/backends/platform/psp/trace.cpp
@@ -18,11 +18,21 @@
* 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$
- *
*/
+// 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/psp/trace.h b/backends/platform/psp/trace.h
index 39b335b16c..dda258f2cb 100644
--- a/backends/platform/psp/trace.h
+++ b/backends/platform/psp/trace.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
diff --git a/backends/platform/samsungtv/main.cpp b/backends/platform/samsungtv/main.cpp
index 3beb97165f..4f3291613d 100644
--- a/backends/platform/samsungtv/main.cpp
+++ b/backends/platform/samsungtv/main.cpp
@@ -18,11 +18,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
#include "backends/platform/samsungtv/samsungtv.h"
#include "backends/plugins/sdl/sdl-provider.h"
#include "base/main.h"
@@ -39,7 +38,7 @@ extern "C" int Game_Main(char *path, char *) {
assert(g_system);
// Pre initialize the backend
- ((OSystem_SDL_SamsungTV *)g_system)->init();
+ ((OSystem_POSIX *)g_system)->init();
#ifdef DYNAMIC_MODULES
PluginManager::instance().addPluginProvider(new SDLPluginProvider());
@@ -49,7 +48,7 @@ extern "C" int Game_Main(char *path, char *) {
int res = scummvm_main(0, 0);
// Free OSystem
- delete g_system;
+ delete (OSystem_SDL_SamsungTV *)g_system;
return res;
}
diff --git a/backends/platform/samsungtv/module.mk b/backends/platform/samsungtv/module.mk
index 36ad75da6d..cba09db74c 100644
--- a/backends/platform/samsungtv/module.mk
+++ b/backends/platform/samsungtv/module.mk
@@ -8,3 +8,6 @@ MODULE_OBJS := \
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)
MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
+
+# Hack to ensure the SDL backend is built so we can use OSystem_SDL.
+-include $(srcdir)/backends/platform/sdl/module.mk
diff --git a/backends/platform/samsungtv/samsungtv.cpp b/backends/platform/samsungtv/samsungtv.cpp
index 4d6dca7403..1b978d0121 100644
--- a/backends/platform/samsungtv/samsungtv.cpp
+++ b/backends/platform/samsungtv/samsungtv.cpp
@@ -18,25 +18,17 @@
* 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 "backends/platform/samsungtv/samsungtv.h"
#include "backends/events/samsungtvsdl/samsungtvsdl-events.h"
+#include "backends/graphics/samsungtvsdl/samsungtvsdl-graphics.h"
#if defined(SAMSUNGTV)
OSystem_SDL_SamsungTV::OSystem_SDL_SamsungTV()
:
- OSystem_POSIX("/dtv/usb/sda1/.scummvmrc") {
-}
-
-bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
- return
- (f == OSystem::kFeatureAspectRatioCorrection) ||
- (f == OSystem::kFeatureCursorHasPalette);
+ OSystem_POSIX("/mtd_rwarea/.scummvmrc") {
}
void OSystem_SDL_SamsungTV::initBackend() {
@@ -44,27 +36,22 @@ void OSystem_SDL_SamsungTV::initBackend() {
if (_eventSource == 0)
_eventSource = new SamsungTVSdlEventSource();
+ if (_graphicsManager == 0)
+ _graphicsManager = new SamsungTVSdlGraphicsManager(_eventSource);
+
// Call parent implementation of this method
- OSystem_SDL::initBackend();
+ OSystem_POSIX::initBackend();
}
-void OSystem_SDL_SamsungTV::setFeatureState(Feature f, bool enable) {
- switch (f) {
- case OSystem::kFeatureAspectRatioCorrection:
- _graphicsManager->setFeatureState(f, enable);
- break;
- default:
- break;
- }
+void OSystem_SDL_SamsungTV::quit() {
+ delete this;
}
-bool OSystem_SDL_SamsungTV::getFeatureState(Feature f) {
- switch (f) {
- case OSystem::kFeatureAspectRatioCorrection:
- return _graphicsManager->getFeatureState(f);
- default:
- return false;
- }
+void OSystem_SDL_SamsungTV::fatalError() {
+ delete this;
+ // FIXME
+ warning("fatal error");
+ for (;;) {}
}
#endif
diff --git a/backends/platform/samsungtv/samsungtv.h b/backends/platform/samsungtv/samsungtv.h
index bccb6baee9..b7a78a96cd 100644
--- a/backends/platform/samsungtv/samsungtv.h
+++ b/backends/platform/samsungtv/samsungtv.h
@@ -18,14 +18,13 @@
* 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 PLATFORM_SDL_SAMSUNGTV_H
#define PLATFORM_SDL_SAMSUNGTV_H
+#if defined(SAMSUNGTV)
+
#include "backends/platform/sdl/posix/posix.h"
class OSystem_SDL_SamsungTV : public OSystem_POSIX {
@@ -33,10 +32,10 @@ public:
OSystem_SDL_SamsungTV();
virtual void initBackend();
-
- virtual bool hasFeature(Feature f);
- virtual void setFeatureState(Feature f, bool enable);
- virtual bool getFeatureState(Feature f);
+ virtual void quit();
+ virtual void fatalError();
};
#endif
+
+#endif
diff --git a/backends/platform/sdl/amigaos/amigaos-main.cpp b/backends/platform/sdl/amigaos/amigaos-main.cpp
index beb27fd714..da83756a40 100644
--- a/backends/platform/sdl/amigaos/amigaos-main.cpp
+++ b/backends/platform/sdl/amigaos/amigaos-main.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/platform/sdl/amigaos/amigaos.cpp b/backends/platform/sdl/amigaos/amigaos.cpp
index 77c2c2e21d..94daacfd14 100644
--- a/backends/platform/sdl/amigaos/amigaos.cpp
+++ b/backends/platform/sdl/amigaos/amigaos.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/platform/sdl/amigaos/amigaos.h b/backends/platform/sdl/amigaos/amigaos.h
index 92232ec98a..391a0bfa9a 100644
--- a/backends/platform/sdl/amigaos/amigaos.h
+++ b/backends/platform/sdl/amigaos/amigaos.h
@@ -18,9 +18,6 @@
* 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 PLATFORM_SDL_AMIGAOS_H
diff --git a/backends/platform/sdl/hardwarekeys.cpp b/backends/platform/sdl/hardwarekeys.cpp
index 1a8124bbf3..9a33e357da 100644
--- a/backends/platform/sdl/hardwarekeys.cpp
+++ b/backends/platform/sdl/hardwarekeys.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/sdl/sdl.h"
diff --git a/backends/platform/sdl/macosx/macosx-main.cpp b/backends/platform/sdl/macosx/macosx-main.cpp
index 94655f8118..b89264f9e9 100644
--- a/backends/platform/sdl/macosx/macosx-main.cpp
+++ b/backends/platform/sdl/macosx/macosx-main.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/platform/sdl/macosx/macosx.cpp b/backends/platform/sdl/macosx/macosx.cpp
index 5ea65b6449..0ef16d9a6e 100644
--- a/backends/platform/sdl/macosx/macosx.cpp
+++ b/backends/platform/sdl/macosx/macosx.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/sdl/macosx/macosx.h b/backends/platform/sdl/macosx/macosx.h
index c31cc7a2d0..6d78427522 100644
--- a/backends/platform/sdl/macosx/macosx.h
+++ b/backends/platform/sdl/macosx/macosx.h
@@ -18,9 +18,6 @@
* 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 PLATFORM_SDL_MACOSX_H
diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp
index 14cfaaee57..1992bdd3f2 100644
--- a/backends/platform/sdl/main.cpp
+++ b/backends/platform/sdl/main.cpp
@@ -18,16 +18,13 @@
* 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/scummsys.h"
// Several SDL based ports use a custom main, and hence do not want to compile
// of this file. The following "#if" ensures that.
-#if !defined(UNIX) && \
+#if !defined(POSIX) && \
!defined(WIN32) && \
!defined(__MAEMO__) && \
!defined(__SYMBIAN32__) && \
@@ -36,6 +33,7 @@
!defined(DINGUX) && \
!defined(CAANOO) && \
!defined(LINUXMOTO) && \
+ !defined(SAMSUNGTV) && \
!defined(OPENPANDORA)
#include "backends/platform/sdl/sdl.h"
diff --git a/backends/platform/sdl/module.mk b/backends/platform/sdl/module.mk
index 87a0e3d658..efc5168d5b 100644
--- a/backends/platform/sdl/module.mk
+++ b/backends/platform/sdl/module.mk
@@ -5,7 +5,7 @@ MODULE_OBJS := \
main.o \
sdl.o
-ifdef UNIX
+ifdef POSIX
MODULE_OBJS += \
posix/posix-main.o \
posix/posix.o
diff --git a/backends/platform/sdl/posix/posix-main.cpp b/backends/platform/sdl/posix/posix-main.cpp
index 72777e1ab7..f78e001398 100644
--- a/backends/platform/sdl/posix/posix-main.cpp
+++ b/backends/platform/sdl/posix/posix-main.cpp
@@ -18,14 +18,11 @@
* 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/scummsys.h"
-#if defined(UNIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA)
+#if defined(POSIX) && !defined(MACOSX) && !defined(SAMSUNGTV) && !defined(WEBOS) && !defined(LINUXMOTO) && !defined(GPH_DEVICE) && !defined(GP2X) && !defined(DINGUX) && !defined(OPENPANDORA)
#include "backends/platform/sdl/posix/posix.h"
#include "backends/plugins/sdl/sdl-provider.h"
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index 71a88265a0..21ad7b9e35 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -18,14 +18,15 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_getenv
+#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
+#ifdef POSIX
#include "backends/platform/sdl/posix/posix.h"
#include "backends/saves/posix/posix-saves.h"
@@ -34,6 +35,7 @@
#include <errno.h>
#include <sys/stat.h>
+
OSystem_POSIX::OSystem_POSIX(Common::String baseConfigName)
:
_baseConfigName(baseConfigName) {
@@ -59,7 +61,7 @@ void OSystem_POSIX::initBackend() {
Common::String OSystem_POSIX::getDefaultConfigFileName() {
char configFile[MAXPATHLEN];
- // On UNIX type systems, by default we store the config file inside
+ // On POSIX type systems, by default we store the config file inside
// to the HOME directory of the user.
const char *home = getenv("HOME");
if (home != NULL && strlen(home) < MAXPATHLEN)
@@ -81,6 +83,9 @@ Common::WriteStream *OSystem_POSIX::createLogFile() {
#else
logFile += "/.scummvm";
#endif
+#ifdef SAMSUNGTV
+ logFile = "/mtd_ram";
+#endif
struct stat sb;
diff --git a/backends/platform/sdl/posix/posix.h b/backends/platform/sdl/posix/posix.h
index a0a0b89c40..0a4f38e2c4 100644
--- a/backends/platform/sdl/posix/posix.h
+++ b/backends/platform/sdl/posix/posix.h
@@ -18,9 +18,6 @@
* 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 PLATFORM_SDL_POSIX_H
diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h
index 23a25f0a82..77515ff4e5 100644
--- a/backends/platform/sdl/sdl-sys.h
+++ b/backends/platform/sdl/sdl-sys.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef BACKEND_SDL_SYS_H
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index bddb48ca95..a3fb719ca4 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -18,11 +18,11 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+#define FORBIDDEN_SYMBOL_EXCEPTION_exit
+
#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@@ -32,6 +32,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"
@@ -214,6 +215,11 @@ void OSystem_SDL::initSDL() {
if (ConfMan.hasKey("disable_sdl_parachute"))
sdlFlags |= SDL_INIT_NOPARACHUTE;
+#ifdef WEBOS
+ // WebOS needs this flag or otherwise the application won't start
+ sdlFlags |= SDL_INIT_VIDEO;
+#endif
+
// Initialize SDL (SDL Subsystems are initiliazed in the corresponding sdl managers)
if (SDL_Init(sdlFlags) == -1)
error("Could not initialize SDL: %s", SDL_GetError());
@@ -373,7 +379,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;
@@ -388,13 +398,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/sdl.h b/backends/platform/sdl/sdl.h
index dac1f18a88..e9e9bc5696 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -18,9 +18,6 @@
* 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 PLATFORM_SDL_H
diff --git a/backends/platform/sdl/win32/win32-main.cpp b/backends/platform/sdl/win32/win32-main.cpp
index 50743e65a5..2b3e18e9f0 100644
--- a/backends/platform/sdl/win32/win32-main.cpp
+++ b/backends/platform/sdl/win32/win32-main.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp
index 9459263ae2..93b76f4188 100644
--- a/backends/platform/sdl/win32/win32.cpp
+++ b/backends/platform/sdl/win32/win32.cpp
@@ -18,15 +18,14 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h"
+#include "common/error.h"
+#include "common/textconsole.h"
#ifdef WIN32
@@ -37,6 +36,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 +169,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..268449eeff 100644
--- a/backends/platform/sdl/win32/win32.h
+++ b/backends/platform/sdl/win32/win32.h
@@ -18,9 +18,6 @@
* 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 PLATFORM_SDL_WIN32_H
@@ -32,6 +29,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/README b/backends/platform/symbian/README
index d7e8235e1d..140f442fb6 100644
--- a/backends/platform/symbian/README
+++ b/backends/platform/symbian/README
@@ -6,8 +6,6 @@
Copyright (C) 2002-2008 Jurgen 'SumthinWicked' Braam
Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson
- $URL$
- $Id$
Using parts of snprintf.c by
Mark Martinec <mark.martinec@ijs.si>, April 1999, June 2000
diff --git a/backends/platform/symbian/S60/ScummVM_S60.mmp.in b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
index b76a6a9a89..7b401fd310 100644
--- a/backends/platform/symbian/S60/ScummVM_S60.mmp.in
+++ b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/S60/ScummVM_S60_App.mmp b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
index 40333854af..940997cc73 100644
--- a/backends/platform/symbian/S60/ScummVM_S60_App.mmp
+++ b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg
index 755720616d..da69d455d7 100644
--- a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg
+++ b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg
@@ -18,9 +18,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg
index 747f6dff4a..469c815afb 100644
--- a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg
+++ b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v2.pkg
@@ -18,9 +18,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
index 12b4cb3610..aa5e1f9b18 100644
--- a/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_A0000658_S60v3.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
@@ -63,8 +60,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 +116,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..09592ef3e3 100644
--- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
@@ -63,8 +60,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 +116,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-CVS-SymbianS60v3.pkg b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
index a5457fca0e..2cc49a2bc6 100644
--- a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
+++ b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
@@ -17,9 +17,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/S80/ScummVM_S80.mmp.in b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
index 306dfac9ef..efd0d0ee32 100644
--- a/backends/platform/symbian/S80/ScummVM_S80.mmp.in
+++ b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/S80/ScummVM_S80_App.mmp b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
index d3fb53c3e6..e91b504087 100644
--- a/backends/platform/symbian/S80/ScummVM_S80_App.mmp
+++ b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
index 4cdcace8e0..c3563b4041 100644
--- a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
+++ b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
@@ -18,9 +18,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/S90/Scummvm_S90.mmp.in b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
index 333bb4a231..4afdb5c62e 100644
--- a/backends/platform/symbian/S90/Scummvm_S90.mmp.in
+++ b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/S90/Scummvm_S90_App.mmp b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
index 371ab16bba..3aa2cc2a65 100644
--- a/backends/platform/symbian/S90/Scummvm_S90_App.mmp
+++ b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
index 7c206d1b9b..457f41998b 100644
--- a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
+++ b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
@@ -18,9 +18,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/UIQ2/ScummVM.rss b/backends/platform/symbian/UIQ2/ScummVM.rss
index 69ca655a67..3550d82f7d 100644
--- a/backends/platform/symbian/UIQ2/ScummVM.rss
+++ b/backends/platform/symbian/UIQ2/ScummVM.rss
@@ -18,8 +18,6 @@
* 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$
*/
// ScummVM.RSS
diff --git a/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in b/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in
index 4fda28e9d9..4000b1653d 100644
--- a/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in
+++ b/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in
@@ -18,9 +18,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg
index 537e4f6693..e2b8a85162 100644
--- a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg
+++ b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg
@@ -18,9 +18,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg
index 204c93e46f..ad3a31cb30 100644
--- a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg
+++ b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2_SE.pkg
@@ -18,9 +18,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/UIQ3/ScummVM.rss b/backends/platform/symbian/UIQ3/ScummVM.rss
index 505bfcdb94..cb47568288 100644
--- a/backends/platform/symbian/UIQ3/ScummVM.rss
+++ b/backends/platform/symbian/UIQ3/ScummVM.rss
@@ -22,9 +22,6 @@
* 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$
- *
*/
// ScummVM.RSS
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
index 505bfcdb94..cb47568288 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658.rss
@@ -22,9 +22,6 @@
* 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$
- *
*/
// ScummVM.RSS
diff --git a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
index 3fab5cc2b7..e6f2b691ce 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_A0000658_UIQ3.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
@@ -64,8 +61,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 +114,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..3b6a3d9bd7 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
@@ -64,8 +61,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 +114,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-CVS-SymbianUIQ3.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
index 4323c4e5ac..2187a375a8 100644
--- a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
+++ b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
@@ -18,9 +18,6 @@
; 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$
-;
;
;;;
diff --git a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
index a037162d14..a6ee70ab25 100644
--- a/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
+++ b/backends/platform/symbian/UIQ3/scummvm_A0000658_loc.rss
@@ -22,9 +22,6 @@
* 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 <AppInfo.rh>
diff --git a/backends/platform/symbian/mmp/scummvm_agi.mmp.in b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
index e2d98b9ae4..a7dcfb0bb5 100644
--- a/backends/platform/symbian/mmp/scummvm_agi.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agi.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_agos.mmp.in b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
index 077111d783..4708a040ec 100644
--- a/backends/platform/symbian/mmp/scummvm_agos.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_agos.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in
index b3bfbab530..9acef57cea 100644
--- a/backends/platform/symbian/mmp/scummvm_base.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
@@ -96,11 +93,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_cine.mmp.in b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
index 2c8118ef13..aac7d8b5b1 100644
--- a/backends/platform/symbian/mmp/scummvm_cine.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cine.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
index b43a867da3..fc60bfeace 100644
--- a/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_cruise.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_draci.mmp.in b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
index 9f24927f27..d879a03797 100644
--- a/backends/platform/symbian/mmp/scummvm_draci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_draci.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
index d8cc6da6ae..f83bcdb68f 100644
--- a/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_drascula.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_gob.mmp.in b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
index ce94f85283..900f862846 100644
--- a/backends/platform/symbian/mmp/scummvm_gob.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_gob.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
index 7229edf4aa..1051e6adea 100644
--- a/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_groovie.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
index b3f9edd1e6..31975d3107 100644
--- a/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_hugo.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
index 654632c229..453d41bdc1 100644
--- a/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_kyra.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
index 418730c064..5d0fe6de36 100644
--- a/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lastexpress.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_lure.mmp.in b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
index e1a63b602b..add33d7d8b 100644
--- a/backends/platform/symbian/mmp/scummvm_lure.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_m4.mmp.in b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
index c2e1ce4e8b..6896dadf10 100644
--- a/backends/platform/symbian/mmp/scummvm_m4.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_m4.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_made.mmp.in b/backends/platform/symbian/mmp/scummvm_made.mmp.in
index 91b9ca756d..c51d3ac618 100644
--- a/backends/platform/symbian/mmp/scummvm_made.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_made.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
index 0edba5eb4d..296c458e39 100644
--- a/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_mohawk.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
index 744a756f4e..4052a16693 100644
--- a/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_parallaction.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_queen.mmp.in b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
index bf88744701..ec4ccff939 100644
--- a/backends/platform/symbian/mmp/scummvm_queen.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_queen.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_saga.mmp.in b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
index a95ee1e7fd..44e222144c 100644
--- a/backends/platform/symbian/mmp/scummvm_saga.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_saga.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_sci.mmp.in b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
index ca9e712f3f..12588495cb 100644
--- a/backends/platform/symbian/mmp/scummvm_sci.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sci.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
index 0a3cd9bb7d..381a6060dd 100644
--- a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_sky.mmp.in b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
index 1bc2301745..f34c839076 100644
--- a/backends/platform/symbian/mmp/scummvm_sky.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sky.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
index 6bf543070b..58f9f8fa05 100644
--- a/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword1.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
index cee4143f94..4a19be92ce 100644
--- a/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_sword2.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
index fa4ef79692..6b4812489e 100644
--- a/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_teenagent.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
index 569b79ba3c..bb56022f20 100644
--- a/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tinsel.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_toon.mmp.in b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
index f309e6d0fa..05742d5242 100644
--- a/backends/platform/symbian/mmp/scummvm_toon.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_toon.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/mmp/scummvm_touche.mmp.in b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
index ab42afe304..ea8dd2392c 100644
--- a/backends/platform/symbian/mmp/scummvm_touche.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_touche.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
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..b7eb3290b3
--- /dev/null
+++ b/backends/platform/symbian/mmp/scummvm_tsage.mmp.in
@@ -0,0 +1,61 @@
+/* ScummVM - Graphic Adventure Engine
+ * Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson - Original EPOC port, ESDL
+ * Copyright (C) 2003-2005 Lars 'AnotherGuest' Persson - Original EPOC port, Audio System
+ * Copyright (C) 2005 Jurgen 'SumthinWicked' Braam - EPOC/CVS maintainer
+ * Copyright (C) 2005-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.
+ *
+ */
+
+//
+// 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/mmp/scummvm_tucker.mmp.in b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
index 434072bc96..0aeb0dc4ec 100644
--- a/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_tucker.mmp.in
@@ -22,9 +22,6 @@
* 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$
- *
*/
//
diff --git a/backends/platform/symbian/res/ScummVmAif.rss b/backends/platform/symbian/res/ScummVmAif.rss
index b1ac4faa67..31bf7bd394 100644
--- a/backends/platform/symbian/res/ScummVmAif.rss
+++ b/backends/platform/symbian/res/ScummVmAif.rss
@@ -22,8 +22,6 @@
* 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 <aiftool.rh>
diff --git a/backends/platform/symbian/res/scummvm.rss b/backends/platform/symbian/res/scummvm.rss
index 8239d7e2d3..62da39e6a8 100644
--- a/backends/platform/symbian/res/scummvm.rss
+++ b/backends/platform/symbian/res/scummvm.rss
@@ -22,8 +22,6 @@
* 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$
*/
// ScummVM.RSS
diff --git a/backends/platform/symbian/res/scummvm_A0000658.rss b/backends/platform/symbian/res/scummvm_A0000658.rss
index d3dae5e143..5615bbda9f 100644
--- a/backends/platform/symbian/res/scummvm_A0000658.rss
+++ b/backends/platform/symbian/res/scummvm_A0000658.rss
@@ -22,8 +22,6 @@
* 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$
*/
// ScummVM.RSS
diff --git a/backends/platform/symbian/src/ScummApp.cpp b/backends/platform/symbian/src/ScummApp.cpp
index 01af5e7fd9..c4d9fc88d9 100644
--- a/backends/platform/symbian/src/ScummApp.cpp
+++ b/backends/platform/symbian/src/ScummApp.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 "backends/platform/symbian/src/ScummApp.h"
diff --git a/backends/platform/symbian/src/ScummApp.h b/backends/platform/symbian/src/ScummApp.h
index cca8e2a7c9..376964f0a1 100644
--- a/backends/platform/symbian/src/ScummApp.h
+++ b/backends/platform/symbian/src/ScummApp.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 SCUMMAPP_H
diff --git a/backends/platform/symbian/src/ScummVMApp.h b/backends/platform/symbian/src/ScummVMApp.h
index aee098f989..adc39a9ee2 100644
--- a/backends/platform/symbian/src/ScummVMApp.h
+++ b/backends/platform/symbian/src/ScummVMApp.h
@@ -18,9 +18,6 @@
* 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 SCUMMVMAPP_H
diff --git a/backends/platform/symbian/src/ScummVm.hrh b/backends/platform/symbian/src/ScummVm.hrh
index bca5d7291e..c18048c922 100644
--- a/backends/platform/symbian/src/ScummVm.hrh
+++ b/backends/platform/symbian/src/ScummVm.hrh
@@ -22,9 +22,6 @@
* 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 ScummHRH
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index 1a55a68778..5de386b1da 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/symbian/src/SymbianActions.h"
diff --git a/backends/platform/symbian/src/SymbianActions.h b/backends/platform/symbian/src/SymbianActions.h
index c652d0be7e..2b65c6c950 100644
--- a/backends/platform/symbian/src/SymbianActions.h
+++ b/backends/platform/symbian/src/SymbianActions.h
@@ -18,9 +18,6 @@
* 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 SYMBIANACTIONS_H
diff --git a/backends/platform/symbian/src/SymbianMain.cpp b/backends/platform/symbian/src/SymbianMain.cpp
index 837961e89c..8da2b239f4 100644
--- a/backends/platform/symbian/src/SymbianMain.cpp
+++ b/backends/platform/symbian/src/SymbianMain.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/symbian/src/portdefs.h"
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index bccbec4a52..9cccc81d19 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 <sdlapp.h> // for CSDLApp::GetExecutablePathCStr() @ Symbian::GetExecutablePath()
diff --git a/backends/platform/symbian/src/SymbianOS.h b/backends/platform/symbian/src/SymbianOS.h
index 0142054492..74a102dc15 100644
--- a/backends/platform/symbian/src/SymbianOS.h
+++ b/backends/platform/symbian/src/SymbianOS.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 PLATFORM_SDL_SYMBIAN_H
diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h
index 1c5de2d43c..ebcd273659 100644
--- a/backends/platform/symbian/src/portdefs.h
+++ b/backends/platform/symbian/src/portdefs.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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_PORTDEFS_H
#define SYMBIAN_PORTDEFS_H
@@ -35,6 +32,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
new file mode 100644
index 0000000000..43c7ba18af
--- /dev/null
+++ b/backends/platform/webos/main.cpp
@@ -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.
+ *
+ */
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
+#include "backends/platform/webos/webos.h"
+#include "backends/plugins/sdl/sdl-provider.h"
+#include "base/main.h"
+
+#if defined(WEBOS)
+
+#include <unistd.h>
+
+int main(int argc, char* argv[]) {
+ g_system = new OSystem_SDL_WebOS();
+ assert(g_system);
+
+ ((OSystem_SDL_WebOS *)g_system)->init();
+
+#ifdef DYNAMIC_MODULES
+ PluginManager::instance().addPluginProvider(new SDLPluginProvider());
+#endif
+
+ // Invoke the actual ScummVM main entry point:
+ int res = scummvm_main(argc, argv);
+
+ // Free OSystem
+ delete (OSystem_SDL_WebOS *)g_system;
+
+ return res;
+}
+
+#endif
diff --git a/backends/platform/webos/module.mk b/backends/platform/webos/module.mk
new file mode 100644
index 0000000000..fe4ec1e079
--- /dev/null
+++ b/backends/platform/webos/module.mk
@@ -0,0 +1,10 @@
+MODULE := backends/platform/webos
+
+MODULE_OBJS := \
+ main.o \
+ webos.o
+
+# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
+MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
+OBJS := $(MODULE_OBJS) $(OBJS)
+MODULE_DIRS += $(sort $(dir $(MODULE_OBJS)))
diff --git a/backends/platform/webos/webos.cpp b/backends/platform/webos/webos.cpp
new file mode 100644
index 0000000000..bfb19ed3bc
--- /dev/null
+++ b/backends/platform/webos/webos.cpp
@@ -0,0 +1,70 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "backends/platform/webos/webos.h"
+#include "backends/events/webossdl/webossdl-events.h"
+#include "backends/keymapper/keymapper.h"
+
+#if defined(WEBOS)
+
+using namespace Common;
+
+OSystem_SDL_WebOS::OSystem_SDL_WebOS()
+ :
+ OSystem_POSIX() {
+}
+
+/**
+ * Initializes the backend.
+ */
+void OSystem_SDL_WebOS::initBackend() {
+ // Create the events manager
+ if (_eventSource == 0)
+ _eventSource = new WebOSSdlEventSource();
+
+ // Call parent implementation of this method
+ OSystem_SDL::initBackend();
+}
+
+/**
+ * Gets the original SDL hardware key set, adds WebOS specific keys and
+ * returns the new key set.
+ *
+ * @return The hardware key set with added webOS specific keys.
+ */
+HardwareKeySet *OSystem_SDL_WebOS::getHardwareKeySet() {
+#ifdef ENABLE_KEYMAPPER
+ // Get the original SDL hardware key set
+ HardwareKeySet *keySet = OSystem_SDL::getHardwareKeySet();
+
+ // Add WebOS specific keys
+ keySet->addHardwareKey(new HardwareKey("FORWARD",
+ KeyState((KeyCode) 229, 229, 0), "Forward", kActionKeyType));
+
+ // Return the modified hardware key set
+ return keySet;
+#else
+ return 0;
+#endif
+}
+
+#endif
diff --git a/backends/plugins/dc/dc-provider.h b/backends/platform/webos/webos.h
index 55413ade5a..850aaf9ce2 100644
--- a/backends/plugins/dc/dc-provider.h
+++ b/backends/platform/webos/webos.h
@@ -18,25 +18,20 @@
* 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 BACKENDS_PLUGINS_DC_H
-#define BACKENDS_PLUGINS_DC_H
-
-#include "base/plugins.h"
+#ifndef PLATFORM_SDL_WEBOS_H
+#define PLATFORM_SDL_WEBOS_H
-#if defined(DYNAMIC_MODULES) && defined(__DC__)
+#include "common/system.h"
+#include "backends/platform/sdl/posix/posix.h"
-class DCPluginProvider : public FilePluginProvider {
-protected:
- Plugin* createPlugin(const Common::FSNode &node) const;
+class OSystem_SDL_WebOS : public OSystem_POSIX {
+public:
+ OSystem_SDL_WebOS();
- bool isPluginFilename(const Common::FSNode &node) const;
+ virtual void initBackend();
+ virtual Common::HardwareKeySet *getHardwareKeySet();
};
-#endif // defined(DYNAMIC_MODULES) && defined(__DC__)
-
#endif
diff --git a/backends/platform/webos/webos.mk b/backends/platform/webos/webos.mk
new file mode 100644
index 0000000000..37223ac56c
--- /dev/null
+++ b/backends/platform/webos/webos.mk
@@ -0,0 +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
+
+uninstall:
+ $(QUIET)$(RM_REC) "$(DESTDIR)$(prefix)"
+
+package: uninstall install
+ $(QUIET)$(RM_REC) "$(PORTDISTDIR)"
+ $(QUIET)$(MKDIR) "$(PORTDISTDIR)"
+ $(QUIET)$(WEBOS_SDK)/bin/palm-package --use-v1-format "$(DESTDIR)$(prefix)" -o "$(PORTDISTDIR)"
+
+.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/options.cpp b/backends/platform/wii/options.cpp
index ffabc5ae97..8c12ad9b81 100644
--- a/backends/platform/wii/options.cpp
+++ b/backends/platform/wii/options.cpp
@@ -175,15 +175,15 @@ void WiiOptionsDialog::handleTickle() {
break;
case -EBUSY:
- label = _("Initialising network");
+ label = _("Initializing network");
break;
case -ETIMEDOUT:
- label = _("Timeout while initialising network");
+ label = _("Timeout while initializing network");
break;
default:
- label = String::format(_("Network not initialised (%d)"), status);
+ label = String::format(_("Network not initialized (%d)"), status);
break;
}
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/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index 3895c7d6fa..f2c461fcf9 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/wince/CEActionsPocket.h b/backends/platform/wince/CEActionsPocket.h
index 72a2064fbf..fd97c0b1df 100644
--- a/backends/platform/wince/CEActionsPocket.h
+++ b/backends/platform/wince/CEActionsPocket.h
@@ -18,9 +18,6 @@
* 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 CEACTIONSPOCKET_H
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index 413c52af2b..fdd52cfc26 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
diff --git a/backends/platform/wince/CEActionsSmartphone.h b/backends/platform/wince/CEActionsSmartphone.h
index 29156bb152..5535ce1350 100644
--- a/backends/platform/wince/CEActionsSmartphone.h
+++ b/backends/platform/wince/CEActionsSmartphone.h
@@ -18,9 +18,6 @@
* 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 CEACTIONSSMARTPHONE_H
diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp
index ffe2523b47..640b1e9169 100644
--- a/backends/platform/wince/CEDevice.cpp
+++ b/backends/platform/wince/CEDevice.cpp
@@ -18,9 +18,6 @@
* 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 "CEDevice.h"
diff --git a/backends/platform/wince/CEDevice.h b/backends/platform/wince/CEDevice.h
index 24dffca0b3..b9f815ac71 100644
--- a/backends/platform/wince/CEDevice.h
+++ b/backends/platform/wince/CEDevice.h
@@ -18,9 +18,6 @@
* 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 CEDEVICE_H
diff --git a/backends/platform/wince/CEException.cpp b/backends/platform/wince/CEException.cpp
index 08a327136f..4a03354112 100644
--- a/backends/platform/wince/CEException.cpp
+++ b/backends/platform/wince/CEException.cpp
@@ -18,9 +18,6 @@
* 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 "CEException.h"
diff --git a/backends/platform/wince/CEException.h b/backends/platform/wince/CEException.h
index 08a51a3b3c..3d4616f282 100644
--- a/backends/platform/wince/CEException.h
+++ b/backends/platform/wince/CEException.h
@@ -18,9 +18,6 @@
* 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 <windows.h>
diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp
index 8824af732f..9c832dd585 100644
--- a/backends/platform/wince/CELauncherDialog.cpp
+++ b/backends/platform/wince/CELauncherDialog.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Disable symbol overrides so that we can use system headers.
@@ -50,12 +47,9 @@ public:
CEAboutDialog()
: Dialog(10, 60, 300, 77) {
char tempo[100];
-
- // FIXME: Fingolfin asks: why is there a FIXME here? Please either clarify what
- // needs fixing, or remove it!
const int buttonWidth = g_gui.xmlEval()->getVar("Globals.Button.Width", 0);
const int buttonHeight = g_gui.xmlEval()->getVar("Globals.Button.Height", 0);
- new ButtonWidget(this, (_w - buttonWidth) / 2, 45, buttonWidth, buttonHeight, _("OK"), 0, kCloseCmd, '\r'); // Close dialog - FIXME
+ new ButtonWidget(this, (_w - buttonWidth) / 2, 55, buttonWidth, buttonHeight, _("OK"), 0, kCloseCmd, '\r');
Common::String videoDriver(_("Using SDL driver "));
SDL_VideoDriverName(tempo, sizeof(tempo));
@@ -64,7 +58,7 @@ public:
Common::String displayInfos(_("Display "));
sprintf(tempo, "%dx%d (real %dx%d)", GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN), OSystem_WINCE3::getScreenWidth(), OSystem_WINCE3::getScreenHeight());
displayInfos += tempo;
- new StaticTextWidget(this, 0, 20, _w, kLineHeight, displayInfos, Graphics::kTextAlignCenter);
+ new StaticTextWidget(this, 0, 30, _w, kLineHeight, displayInfos, Graphics::kTextAlignCenter);
}
};
@@ -79,39 +73,22 @@ void CELauncherDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 d
}
}
-void CELauncherDialog::automaticScanDirectory(const Common::FSNode &node) {
- // First check if we have a recognized game in the current directory
- Common::FSList files;
- node.getChildren(files, Common::FSNode::kListFilesOnly);
- // detect
- GameList candidates(EngineMan.detectGames(files));
- // insert
- if (candidates.size() >= 1) {
- GameDescriptor result = candidates[0];
- result["path"] = node.getPath();
- addGameToConf(result);
- }
- // Then recurse on the subdirectories
- Common::FSList dirs;
- node.getChildren(dirs, Common::FSNode::kListDirectoriesOnly);
- for (Common::FSList::const_iterator currentDir = dirs.begin(); currentDir != dirs.end(); ++currentDir)
- automaticScanDirectory(*currentDir);
-
-}
-
-/* FIXME: We do this here, replicating code of the launcher, because findfirst/next
- * returns some illegal paths atm.
- */
void CELauncherDialog::addGame() {
MessageDialog alert(_("Do you want to perform an automatic scan ?"), _("Yes"), _("No"));
if (alert.runModal() == kMessageOK && _browser->runModal() > 0) {
- // Clear existing domains
- ConfigManager::DomainMap &domains = (ConfigManager::DomainMap &)ConfMan.getGameDomains();
- domains.clear();
- ConfMan.flushToDisk();
- automaticScanDirectory(_browser->getResult());
- ConfMan.flushToDisk();
- updateListing();
+ MassAddDialog massAddDlg(_browser->getResult());
+
+ massAddDlg.runModal();
+
+ // Update the ListWidget and force a redraw
+
+ // If new target(s) were added, update the ListWidget and move
+ // the selection to to first newly detected game.
+ Common::String newTarget = massAddDlg.getFirstAddedTarget();
+ if (!newTarget.empty()) {
+ updateListing();
+ selectTarget(newTarget);
+ }
draw();
} else
GUILauncherDialog::addGame();
diff --git a/backends/platform/wince/CELauncherDialog.h b/backends/platform/wince/CELauncherDialog.h
index 7755e33dcc..ac84cd3e21 100644
--- a/backends/platform/wince/CELauncherDialog.h
+++ b/backends/platform/wince/CELauncherDialog.h
@@ -18,9 +18,6 @@
* 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 CELAUNCHERDIALOG_H
@@ -29,6 +26,7 @@
#include "base/plugins.h"
#include "common/fs.h"
#include "gui/launcher.h"
+#include "gui/massadd.h"
class CELauncherDialog : public GUI::LauncherDialog {
public:
@@ -36,7 +34,6 @@ public:
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
protected:
void addGame();
- void automaticScanDirectory(const Common::FSNode &node);
};
typedef GUI::LauncherDialog GUILauncherDialog;
diff --git a/backends/platform/wince/CEScaler.cpp b/backends/platform/wince/CEScaler.cpp
index 182a7e0c94..f07a7ec84b 100644
--- a/backends/platform/wince/CEScaler.cpp
+++ b/backends/platform/wince/CEScaler.cpp
@@ -18,9 +18,6 @@
* 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 "graphics/scaler/intern.h"
diff --git a/backends/platform/wince/CEScaler.h b/backends/platform/wince/CEScaler.h
index 4711f94bba..de001f7348 100644
--- a/backends/platform/wince/CEScaler.h
+++ b/backends/platform/wince/CEScaler.h
@@ -18,9 +18,6 @@
* 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 CESCALER_H
diff --git a/backends/platform/wince/CEgui/CEGUI.h b/backends/platform/wince/CEgui/CEGUI.h
index 1107e7d5e5..4e44115476 100644
--- a/backends/platform/wince/CEgui/CEGUI.h
+++ b/backends/platform/wince/CEgui/CEGUI.h
@@ -18,9 +18,6 @@
* 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 "ToolbarHandler.h"
diff --git a/backends/platform/wince/CEgui/GUIElement.cpp b/backends/platform/wince/CEgui/GUIElement.cpp
index e7ffc8d473..241cf514f3 100644
--- a/backends/platform/wince/CEgui/GUIElement.cpp
+++ b/backends/platform/wince/CEgui/GUIElement.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/sdl/sdl-sys.h"
diff --git a/backends/platform/wince/CEgui/GUIElement.h b/backends/platform/wince/CEgui/GUIElement.h
index c599ebe9b5..2639de38ca 100644
--- a/backends/platform/wince/CEgui/GUIElement.h
+++ b/backends/platform/wince/CEgui/GUIElement.h
@@ -18,9 +18,6 @@
* 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 CEGUI_GUIELEMENT_H
diff --git a/backends/platform/wince/CEgui/ItemAction.cpp b/backends/platform/wince/CEgui/ItemAction.cpp
index efbc43ce00..7d6316748b 100644
--- a/backends/platform/wince/CEgui/ItemAction.cpp
+++ b/backends/platform/wince/CEgui/ItemAction.cpp
@@ -18,9 +18,6 @@
* 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 "ItemAction.h"
diff --git a/backends/platform/wince/CEgui/ItemAction.h b/backends/platform/wince/CEgui/ItemAction.h
index 4f35b3090d..7b36eaf11a 100644
--- a/backends/platform/wince/CEgui/ItemAction.h
+++ b/backends/platform/wince/CEgui/ItemAction.h
@@ -18,9 +18,6 @@
* 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 CEGUI_ITEMACTION_H
diff --git a/backends/platform/wince/CEgui/ItemSwitch.cpp b/backends/platform/wince/CEgui/ItemSwitch.cpp
index 8eb62bf365..444826201c 100644
--- a/backends/platform/wince/CEgui/ItemSwitch.cpp
+++ b/backends/platform/wince/CEgui/ItemSwitch.cpp
@@ -18,9 +18,6 @@
* 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 "ItemSwitch.h"
diff --git a/backends/platform/wince/CEgui/ItemSwitch.h b/backends/platform/wince/CEgui/ItemSwitch.h
index 1ca6f3c288..724d31363c 100644
--- a/backends/platform/wince/CEgui/ItemSwitch.h
+++ b/backends/platform/wince/CEgui/ItemSwitch.h
@@ -18,9 +18,6 @@
* 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 CEGUI_ITEMSWITCH_H
diff --git a/backends/platform/wince/CEgui/Panel.cpp b/backends/platform/wince/CEgui/Panel.cpp
index 576da23029..0853bae8f2 100644
--- a/backends/platform/wince/CEgui/Panel.cpp
+++ b/backends/platform/wince/CEgui/Panel.cpp
@@ -18,9 +18,6 @@
* 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 "Panel.h"
diff --git a/backends/platform/wince/CEgui/Panel.h b/backends/platform/wince/CEgui/Panel.h
index 1a8a580dba..514ee5b8af 100644
--- a/backends/platform/wince/CEgui/Panel.h
+++ b/backends/platform/wince/CEgui/Panel.h
@@ -18,9 +18,6 @@
* 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 CEGUI_PANEL_H
diff --git a/backends/platform/wince/CEgui/PanelItem.cpp b/backends/platform/wince/CEgui/PanelItem.cpp
index 8c68c79784..2849e256fb 100644
--- a/backends/platform/wince/CEgui/PanelItem.cpp
+++ b/backends/platform/wince/CEgui/PanelItem.cpp
@@ -18,9 +18,6 @@
* 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 "PanelItem.h"
diff --git a/backends/platform/wince/CEgui/PanelItem.h b/backends/platform/wince/CEgui/PanelItem.h
index 9968aa8d5e..8305311ff2 100644
--- a/backends/platform/wince/CEgui/PanelItem.h
+++ b/backends/platform/wince/CEgui/PanelItem.h
@@ -18,9 +18,6 @@
* 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 CEGUI_PANELITEM_H
diff --git a/backends/platform/wince/CEgui/PanelKeyboard.cpp b/backends/platform/wince/CEgui/PanelKeyboard.cpp
index 3512b34da3..442d7fc68c 100644
--- a/backends/platform/wince/CEgui/PanelKeyboard.cpp
+++ b/backends/platform/wince/CEgui/PanelKeyboard.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/sdl/sdl-sys.h"
diff --git a/backends/platform/wince/CEgui/PanelKeyboard.h b/backends/platform/wince/CEgui/PanelKeyboard.h
index b98e6ff3a8..69d6a89bd2 100644
--- a/backends/platform/wince/CEgui/PanelKeyboard.h
+++ b/backends/platform/wince/CEgui/PanelKeyboard.h
@@ -18,9 +18,6 @@
* 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 CEGUI_PANELKEYBOARD_H
diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.cpp b/backends/platform/wince/CEgui/SDL_ImageResource.cpp
index 872b94a442..507f9ad7fe 100644
--- a/backends/platform/wince/CEgui/SDL_ImageResource.cpp
+++ b/backends/platform/wince/CEgui/SDL_ImageResource.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/sdl/sdl-sys.h"
diff --git a/backends/platform/wince/CEgui/SDL_ImageResource.h b/backends/platform/wince/CEgui/SDL_ImageResource.h
index 397ced1434..08807a5c1f 100644
--- a/backends/platform/wince/CEgui/SDL_ImageResource.h
+++ b/backends/platform/wince/CEgui/SDL_ImageResource.h
@@ -18,9 +18,6 @@
* 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 CEGUI_SDL_IMAGERESOURCE_H
diff --git a/backends/platform/wince/CEgui/Toolbar.cpp b/backends/platform/wince/CEgui/Toolbar.cpp
index c41a30cb43..0e8e82f1f4 100644
--- a/backends/platform/wince/CEgui/Toolbar.cpp
+++ b/backends/platform/wince/CEgui/Toolbar.cpp
@@ -18,9 +18,6 @@
* 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 "Toolbar.h"
diff --git a/backends/platform/wince/CEgui/Toolbar.h b/backends/platform/wince/CEgui/Toolbar.h
index 9fdf05ab3f..c7e62bb3d9 100644
--- a/backends/platform/wince/CEgui/Toolbar.h
+++ b/backends/platform/wince/CEgui/Toolbar.h
@@ -18,9 +18,6 @@
* 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 CEGUI_TOOLBAR_H
diff --git a/backends/platform/wince/CEgui/ToolbarHandler.cpp b/backends/platform/wince/CEgui/ToolbarHandler.cpp
index ed2a72245a..6f4ac317cd 100644
--- a/backends/platform/wince/CEgui/ToolbarHandler.cpp
+++ b/backends/platform/wince/CEgui/ToolbarHandler.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/sdl/sdl-sys.h"
diff --git a/backends/platform/wince/CEgui/ToolbarHandler.h b/backends/platform/wince/CEgui/ToolbarHandler.h
index 0f794d7d61..5709cf3f1a 100644
--- a/backends/platform/wince/CEgui/ToolbarHandler.h
+++ b/backends/platform/wince/CEgui/ToolbarHandler.h
@@ -18,9 +18,6 @@
* 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 CEGUI_TOOLBARHANDLER_H
diff --git a/backends/platform/wince/CEkeys/CEKeys.h b/backends/platform/wince/CEkeys/CEKeys.h
index 87e6d461da..ac4907704d 100644
--- a/backends/platform/wince/CEkeys/CEKeys.h
+++ b/backends/platform/wince/CEkeys/CEKeys.h
@@ -18,9 +18,6 @@
* 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 "EventsBuffer.h"
diff --git a/backends/platform/wince/CEkeys/EventsBuffer.cpp b/backends/platform/wince/CEkeys/EventsBuffer.cpp
index beea272d2b..d5818c3731 100644
--- a/backends/platform/wince/CEkeys/EventsBuffer.cpp
+++ b/backends/platform/wince/CEkeys/EventsBuffer.cpp
@@ -18,9 +18,6 @@
* 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 "backends/platform/sdl/sdl-sys.h"
diff --git a/backends/platform/wince/CEkeys/EventsBuffer.h b/backends/platform/wince/CEkeys/EventsBuffer.h
index 9b766c6ca9..235a3e7afd 100644
--- a/backends/platform/wince/CEkeys/EventsBuffer.h
+++ b/backends/platform/wince/CEkeys/EventsBuffer.h
@@ -18,9 +18,6 @@
* 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 CEKEYS_EVENTSBUFFER_H
diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile
index 21bff06f95..a9741f396f 100644
--- a/backends/platform/wince/Makefile
+++ b/backends/platform/wince/Makefile
@@ -1,7 +1,5 @@
# ScummVM Makefile for Windows CE port
# Uses the cegcc toolchain. For build info check out the wiki: http://wiki.scummvm.org
-# $URL$
-# $Id$
########################################################################
## Do you want a debug build or not?
diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt
index 69abd66e69..5ea3437d18 100644
--- a/backends/platform/wince/README-WinCE.txt
+++ b/backends/platform/wince/README-WinCE.txt
@@ -1,15 +1,25 @@
ScummVM Windows CE FAQ
-Last updated: $Date$
-Release version: 1.1.0
+Last updated: 2011-05-25
+Release version: 1.3.0
------------------------------------------------------------------------
New in this version
-------------------
-1.1.1
+1.3.0:
+This is the first official Windows CE release since 1.1.1, there are no other
+port specific changes.
+
+1.2.1:
+(Note: No official 1.2.1 release)
+
+1.2.0:
+(Note: No official 1.2.0 release)
+
+1.1.1:
Fix to the Normal2xAspect scaler that was causing crashes.
-1.1.0
+1.1.0:
The TeenAgent engine is now included, but there are no other port specific
changes since 1.0.0.
@@ -255,7 +265,7 @@ How do I play a game on a Smartphone device ?
On non-stylus devices, the mouse cursor is emulated via a set of keys.
The cursor will move faster if you keep the key down. You can tweak this
-behaviour in the configuration file described below.
+behavior in the configuration file described below.
Here is
the list of available actions for Smartphones:
@@ -359,7 +369,7 @@ You can tweak these parameters to customize how the cursor is handled.
* repeatTrigger int Number of milliseconds a key must be held to
consider being repeated.
* repeatX int Number of key repeat events before changing
- horizontal cursor behaviour.
+ horizontal cursor behavior.
* stepX1 int Horizontal cursor offset value when the key
is not repeated.
* stepX2 int Horizontal cursor offset value when the key
diff --git a/backends/platform/wince/missing/io.h b/backends/platform/wince/missing/io.h
index 96bc6a9ea1..de492cac68 100644
--- a/backends/platform/wince/missing/io.h
+++ b/backends/platform/wince/missing/io.h
@@ -1,7 +1,6 @@
/* Header is not present in Windows CE SDK */
/* This stuff will live here until port configuration file is in place */
-#define stricmp _stricmp
#define strdup _strdup
#ifndef _FILE_DEFINED
diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp
index c855247ae1..ba35f15bb7 100644
--- a/backends/platform/wince/missing/missing.cpp
+++ b/backends/platform/wince/missing/missing.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
/* Original code:
diff --git a/backends/platform/wince/module.mk b/backends/platform/wince/module.mk
index d1c95f5df4..ddad024084 100644
--- a/backends/platform/wince/module.mk
+++ b/backends/platform/wince/module.mk
@@ -21,9 +21,12 @@ MODULE_OBJS := \
../../../gui/Key.o \
../../../gui/KeysDialog.o \
missing/missing.o \
- PocketSCUMM.o \
smartLandScale.o
+ifndef DYNAMIC_MODULES
+MODULE_OBJS += PocketSCUMM.o
+endif
+
# We don't use rules.mk but rather manually update OBJS and MODULE_DIRS.
MODULE_OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS))
OBJS := $(MODULE_OBJS) $(OBJS)
diff --git a/backends/platform/wince/portdefs.h b/backends/platform/wince/portdefs.h
index 8ad643946f..64aa80abf2 100644
--- a/backends/platform/wince/portdefs.h
+++ b/backends/platform/wince/portdefs.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
// Missing string/stdlib/assert declarations for WinCE 2.xx
@@ -34,8 +31,6 @@ int isprint(int c);
int isspace(int c);
char *strrchr(const char *s, int c);
char *strdup(const char *s);
-int _stricmp(const char *string1, const char *string2);
-int stricmp(const char *string1, const char *string2);
void assert(void *expression);
void assert(int expression);
long int strtol(const char *nptr, char **endptr, int base);
@@ -56,8 +51,6 @@ void GetCurrentDirectory(int len, char *buf);
#include <math.h>
#undef GetCurrentDirectory
extern "C" void GetCurrentDirectory(int len, char *buf);
-#define stricmp _stricmp
-#define strnicmp _strnicmp
#define snprintf _snprintf
#define strdup _strdup
#define fopen wce_fopen
diff --git a/backends/platform/wince/smartLandScale.s b/backends/platform/wince/smartLandScale.s
index 4f26462e95..f8771bc524 100644
--- a/backends/platform/wince/smartLandScale.s
+++ b/backends/platform/wince/smartLandScale.s
@@ -18,9 +18,6 @@
@ 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$
-@
@ @author Robin Watts (robin@wss.co.uk)
@ For 16 source pixels 0123456789ABCDEF, we want to produce 11 output
diff --git a/backends/platform/wince/stub.cpp b/backends/platform/wince/stub.cpp
index 9dad8638e1..9f42dc76aa 100644
--- a/backends/platform/wince/stub.cpp
+++ b/backends/platform/wince/stub.cpp
@@ -18,9 +18,6 @@
* 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 <windows.h>
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index b829686cb0..a53bc41667 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -18,9 +18,6 @@
* 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$
- *
*/
@@ -33,6 +30,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"
@@ -65,6 +63,7 @@
#include "backends/mixer/wincesdl/wincesdl-mixer.h"
#ifdef DYNAMIC_MODULES
+#include <malloc.h>
#include "backends/plugins/win32/win32-provider.h"
#endif
diff --git a/backends/platform/wince/wince-sdl.h b/backends/platform/wince/wince-sdl.h
index d7ede8ca81..a1e46081f9 100644
--- a/backends/platform/wince/wince-sdl.h
+++ b/backends/platform/wince/wince-sdl.h
@@ -18,9 +18,6 @@
* 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 WINCE_SDL_H
diff --git a/backends/platform/wince/wince.mk b/backends/platform/wince/wince.mk
index 39be1e84e5..cac3ad4e8f 100644
--- a/backends/platform/wince/wince.mk
+++ b/backends/platform/wince/wince.mk
@@ -2,3 +2,10 @@ backends/platform/wince/PocketSCUMM.o: $(srcdir)/backends/platform/wince/PocketS
$(QUIET)$(MKDIR) $(*D)
$(WINDRES) $(WINDRESFLAGS) -I$(srcdir)/backends/platform/wince $< $@
+ifdef DYNAMIC_MODULES
+plugins: backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o
+ $(CXX) backends/platform/wince/stub.o backends/platform/wince/PocketSCUMM.o -L. -lscummvm -o scummvm.exe
+
+backends/platform/wince/stub.o: $(srcdir)/backends/platform/wince/stub.cpp
+ $(CXX) -c $(srcdir)/backends/platform/wince/stub.cpp -o backends/platform/wince/stub.o
+endif
diff --git a/backends/plugins/ds/ds-provider.cpp b/backends/plugins/ds/ds-provider.cpp
index d0697371e9..ff4cbe5f96 100644
--- a/backends/plugins/ds/ds-provider.cpp
+++ b/backends/plugins/ds/ds-provider.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/ds/ds-provider.h b/backends/plugins/ds/ds-provider.h
index dcb93c085f..df8307a52d 100644
--- a/backends/plugins/ds/ds-provider.h
+++ b/backends/plugins/ds/ds-provider.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if defined(DYNAMIC_MODULES) && defined(__DS__)
diff --git a/backends/plugins/dynamic-plugin.h b/backends/plugins/dynamic-plugin.h
index 32d411656c..d68321b2a9 100644
--- a/backends/plugins/dynamic-plugin.h
+++ b/backends/plugins/dynamic-plugin.h
@@ -18,15 +18,13 @@
* 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 BACKENDS_PLUGINS_DYNAMICPLUGIN_H
#define BACKENDS_PLUGINS_DYNAMICPLUGIN_H
#include "base/plugins.h"
+#include "common/textconsole.h"
class DynamicPlugin : public Plugin {
diff --git a/backends/plugins/elf/arm-loader.cpp b/backends/plugins/elf/arm-loader.cpp
index 93d3c60f84..12204ef68f 100644
--- a/backends/plugins/elf/arm-loader.cpp
+++ b/backends/plugins/elf/arm-loader.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/elf/arm-loader.h b/backends/plugins/elf/arm-loader.h
index cb4230c1ee..60bc4f8720 100644
--- a/backends/plugins/elf/arm-loader.h
+++ b/backends/plugins/elf/arm-loader.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_PLUGINS_ARM_LOADER_H
diff --git a/backends/plugins/elf/elf-loader.cpp b/backends/plugins/elf/elf-loader.cpp
index f502fa2776..b25bcf835b 100644
--- a/backends/plugins/elf/elf-loader.cpp
+++ b/backends/plugins/elf/elf-loader.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/elf/elf-loader.h b/backends/plugins/elf/elf-loader.h
index e11aaf1ad0..a953507631 100644
--- a/backends/plugins/elf/elf-loader.h
+++ b/backends/plugins/elf/elf-loader.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_PLUGINS_ELF_LOADER_H
diff --git a/backends/plugins/elf/elf-provider.cpp b/backends/plugins/elf/elf-provider.cpp
index 084f5eace7..480f7068c4 100644
--- a/backends/plugins/elf/elf-provider.cpp
+++ b/backends/plugins/elf/elf-provider.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/elf/elf-provider.h b/backends/plugins/elf/elf-provider.h
index 8cc9e0a996..62ea930829 100644
--- a/backends/plugins/elf/elf-provider.h
+++ b/backends/plugins/elf/elf-provider.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_PLUGINS_ELF_PROVIDER_H
diff --git a/backends/plugins/elf/elf32.h b/backends/plugins/elf/elf32.h
index 48ebf2e7b2..aecedf5a37 100644
--- a/backends/plugins/elf/elf32.h
+++ b/backends/plugins/elf/elf32.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_ELF_H
diff --git a/backends/plugins/elf/memory-manager.cpp b/backends/plugins/elf/memory-manager.cpp
index b2ac497771..39f5e9071d 100644
--- a/backends/plugins/elf/memory-manager.cpp
+++ b/backends/plugins/elf/memory-manager.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -28,6 +25,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/elf/memory-manager.h b/backends/plugins/elf/memory-manager.h
index 7a5f3c25df..ac70e5e3bb 100644
--- a/backends/plugins/elf/memory-manager.h
+++ b/backends/plugins/elf/memory-manager.h
@@ -18,9 +18,6 @@
* 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 ELF_MEMORY_MANAGER_H
diff --git a/backends/plugins/elf/mips-loader.cpp b/backends/plugins/elf/mips-loader.cpp
index 42af831ef4..8ce1a69583 100644
--- a/backends/plugins/elf/mips-loader.cpp
+++ b/backends/plugins/elf/mips-loader.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/elf/mips-loader.h b/backends/plugins/elf/mips-loader.h
index 23bd5980c8..3066589c9b 100644
--- a/backends/plugins/elf/mips-loader.h
+++ b/backends/plugins/elf/mips-loader.h
@@ -19,9 +19,6 @@
* 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 BACKENDS_PLUGINS_MIPS_LOADER_H
diff --git a/backends/plugins/elf/ppc-loader.cpp b/backends/plugins/elf/ppc-loader.cpp
index ec6d442876..2f7042c682 100644
--- a/backends/plugins/elf/ppc-loader.cpp
+++ b/backends/plugins/elf/ppc-loader.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/elf/ppc-loader.h b/backends/plugins/elf/ppc-loader.h
index edf2b33965..9aa6c949f1 100644
--- a/backends/plugins/elf/ppc-loader.h
+++ b/backends/plugins/elf/ppc-loader.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_PLUGINS_PPC_LOADER_H
diff --git a/backends/plugins/elf/shorts-segment-manager.cpp b/backends/plugins/elf/shorts-segment-manager.cpp
index 99a765287b..b3a9531c2d 100644
--- a/backends/plugins/elf/shorts-segment-manager.cpp
+++ b/backends/plugins/elf/shorts-segment-manager.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/elf/shorts-segment-manager.h b/backends/plugins/elf/shorts-segment-manager.h
index 219648d91d..8293d55c08 100644
--- a/backends/plugins/elf/shorts-segment-manager.h
+++ b/backends/plugins/elf/shorts-segment-manager.h
@@ -18,9 +18,6 @@
* 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 SHORTS_SEGMENT_MANAGER_H
diff --git a/backends/plugins/elf/version.cpp b/backends/plugins/elf/version.cpp
index 0277c6ae1c..593a17fb2b 100644
--- a/backends/plugins/elf/version.cpp
+++ b/backends/plugins/elf/version.cpp
@@ -18,9 +18,6 @@
* 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 "backends/plugins/elf/version.h"
diff --git a/backends/plugins/elf/version.h b/backends/plugins/elf/version.h
index 726204aeb7..915132e8c4 100644
--- a/backends/plugins/elf/version.h
+++ b/backends/plugins/elf/version.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 BACKENDS_PLUGINS_ELF_VERSION_H
diff --git a/backends/plugins/posix/posix-provider.cpp b/backends/plugins/posix/posix-provider.cpp
index dd3591a992..a68a792fa4 100644
--- a/backends/plugins/posix/posix-provider.cpp
+++ b/backends/plugins/posix/posix-provider.cpp
@@ -18,14 +18,11 @@
* 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/scummsys.h"
-#if defined(DYNAMIC_MODULES) && defined(UNIX)
+#if defined(DYNAMIC_MODULES) && defined(POSIX)
#include "backends/plugins/posix/posix-provider.h"
#include "backends/plugins/dynamic-plugin.h"
@@ -80,9 +77,9 @@ public:
};
-Plugin* POSIXPluginProvider::createPlugin(const Common::FSNode &node) const {
+Plugin *POSIXPluginProvider::createPlugin(const Common::FSNode &node) const {
return new POSIXPlugin(node.getPath());
}
-#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
+#endif // defined(DYNAMIC_MODULES) && defined(POSIX)
diff --git a/backends/plugins/posix/posix-provider.h b/backends/plugins/posix/posix-provider.h
index b7d8c9f945..b1186ccf3f 100644
--- a/backends/plugins/posix/posix-provider.h
+++ b/backends/plugins/posix/posix-provider.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_PLUGINS_POSIX_H
@@ -28,13 +25,13 @@
#include "base/plugins.h"
-#if defined(DYNAMIC_MODULES) && defined(UNIX)
+#if defined(DYNAMIC_MODULES) && defined(POSIX)
class POSIXPluginProvider : public FilePluginProvider {
protected:
- Plugin* createPlugin(const Common::FSNode &node) const;
+ Plugin *createPlugin(const Common::FSNode &node) const;
};
-#endif // defined(DYNAMIC_MODULES) && defined(UNIX)
+#endif // defined(DYNAMIC_MODULES) && defined(POSIX)
#endif
diff --git a/backends/plugins/ps2/ps2-provider.cpp b/backends/plugins/ps2/ps2-provider.cpp
index 0836ed18b4..7c7409eaf9 100644
--- a/backends/plugins/ps2/ps2-provider.cpp
+++ b/backends/plugins/ps2/ps2-provider.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/ps2/ps2-provider.h b/backends/plugins/ps2/ps2-provider.h
index 3d4b4b0128..b9006b1716 100644
--- a/backends/plugins/ps2/ps2-provider.h
+++ b/backends/plugins/ps2/ps2-provider.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if defined(DYNAMIC_MODULES) && defined(__PLAYSTATION2__)
diff --git a/backends/plugins/psp/psp-provider.cpp b/backends/plugins/psp/psp-provider.cpp
index 5fa083c88c..0c41af24a1 100644
--- a/backends/plugins/psp/psp-provider.cpp
+++ b/backends/plugins/psp/psp-provider.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/psp/psp-provider.h b/backends/plugins/psp/psp-provider.h
index 682871fd9a..0cc0457740 100644
--- a/backends/plugins/psp/psp-provider.h
+++ b/backends/plugins/psp/psp-provider.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if defined(DYNAMIC_MODULES) && defined(__PSP__)
diff --git a/backends/plugins/sdl/sdl-provider.cpp b/backends/plugins/sdl/sdl-provider.cpp
index 5172abc4b0..00520b48b0 100644
--- a/backends/plugins/sdl/sdl-provider.cpp
+++ b/backends/plugins/sdl/sdl-provider.cpp
@@ -18,14 +18,11 @@
* 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/scummsys.h"
-#if defined(DYNAMIC_MODULES) && defined(SDL_BACKEND)
+#if defined(DYNAMIC_MODULES) && defined(SDL_BACKEND) && !defined(_WIN32_WCE)
#include "backends/plugins/sdl/sdl-provider.h"
#include "backends/plugins/dynamic-plugin.h"
diff --git a/backends/plugins/sdl/sdl-provider.h b/backends/plugins/sdl/sdl-provider.h
index b546b028a2..881aa5cc19 100644
--- a/backends/plugins/sdl/sdl-provider.h
+++ b/backends/plugins/sdl/sdl-provider.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_PLUGINS_SDL_H
@@ -35,6 +32,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/plugins/wii/wii-provider.cpp b/backends/plugins/wii/wii-provider.cpp
index 639616ac15..fa85588348 100644
--- a/backends/plugins/wii/wii-provider.cpp
+++ b/backends/plugins/wii/wii-provider.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/plugins/wii/wii-provider.h b/backends/plugins/wii/wii-provider.h
index 4ec771490d..573a8e7e59 100644
--- a/backends/plugins/wii/wii-provider.h
+++ b/backends/plugins/wii/wii-provider.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if defined(DYNAMIC_MODULES) && defined(__WII__)
diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp
index 793b1bfc0c..0a08e48e6f 100644
--- a/backends/plugins/win32/win32-provider.cpp
+++ b/backends/plugins/win32/win32-provider.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -70,12 +67,11 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
- #ifndef _WIN32_WCE
+#ifndef _WIN32_WCE
_dlHandle = LoadLibrary(_filename.c_str());
- #else
- if (!_filename.hasSuffix("scummvm.dll")) // skip loading the core scummvm module
- _dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
- #endif
+#else
+ _dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
+#endif
if (!_dlHandle) {
debug("Failed loading plugin '%s' (error code %d)", _filename.c_str(), (int32) GetLastError());
@@ -107,7 +103,11 @@ Plugin* Win32PluginProvider::createPlugin(const Common::FSNode &node) const {
bool Win32PluginProvider::isPluginFilename(const Common::FSNode &node) const {
// Check the plugin suffix
Common::String filename = node.getName();
+#ifndef _WIN32_WCE
if (!filename.hasSuffix(".dll"))
+#else
+ if (!filename.hasSuffix(".plugin"))
+#endif
return false;
return true;
diff --git a/backends/plugins/win32/win32-provider.h b/backends/plugins/win32/win32-provider.h
index 53f60283f6..42c04e6d59 100644
--- a/backends/plugins/win32/win32-provider.h
+++ b/backends/plugins/win32/win32-provider.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_PLUGINS_WIN32_H
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 0e16f165b3..237c50a1ba 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -60,7 +57,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 +81,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 +101,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 +118,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/default/default-saves.h b/backends/saves/default/default-saves.h
index ea3d9e6d44..1ea87efc67 100644
--- a/backends/saves/default/default-saves.h
+++ b/backends/saves/default/default-saves.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_SAVES_DEFAULT_H) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
diff --git a/backends/saves/posix/posix-saves.cpp b/backends/saves/posix/posix-saves.cpp
index 866cd912e5..40380a1b23 100644
--- a/backends/saves/posix/posix-saves.cpp
+++ b/backends/saves/posix/posix-saves.cpp
@@ -18,19 +18,23 @@
* 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$
- *
*/
+
+// Enable getenv, mkdir and time.h stuff
+#define FORBIDDEN_SYMBOL_EXCEPTION_getenv
+#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)
+#if defined(POSIX) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
#include "backends/saves/posix/posix-saves.h"
#include "common/config-manager.h"
#include "common/savefile.h"
+#include "common/textconsole.h"
#include <stdio.h>
#include <string.h>
@@ -47,7 +51,7 @@
POSIXSaveFileManager::POSIXSaveFileManager() {
// Register default savepath based on HOME
#if defined(SAMSUNGTV)
- ConfMan.registerDefault("savepath", "/dtv/usb/sda1/.scummvm");
+ ConfMan.registerDefault("savepath", "/mtd_wiselink/scummvm/savegames");
#else
Common::String savePath;
const char *home = getenv("HOME");
@@ -56,15 +60,30 @@ POSIXSaveFileManager::POSIXSaveFileManager() {
savePath += "/" DEFAULT_SAVE_PATH;
ConfMan.registerDefault("savepath", savePath);
}
+
+ // The user can override the savepath with the SCUMMVM_SAVEPATH
+ // environment variable. This is weaker than a --savepath on the
+ // command line, but overrides the default savepath.
+ //
+ // To ensure that the command line option (if given) has precedence,
+ // we only set the value in the transient domain if it is not
+ // yet present there.
+ if (!ConfMan.hasKey("savepath", Common::ConfigManager::kTransientDomain)) {
+ const char *dir = getenv("SCUMMVM_SAVEPATH");
+ if (dir && *dir && strlen(dir) < MAXPATHLEN) {
+ Common::FSNode saveDir(dir);
+ if (!saveDir.exists()) {
+ warning("Ignoring non-existent SCUMMVM_SAVEPATH '%s'", dir);
+ } else if (!saveDir.isWritable()) {
+ warning("Ignoring non-writable SCUMMVM_SAVEPATH '%s'", dir);
+ } else {
+ ConfMan.set("savepath", dir, Common::ConfigManager::kTransientDomain);
+ }
+ }
+ }
#endif
}
-/*
-POSIXSaveFileManager::POSIXSaveFileManager(const Common::String &defaultSavepath)
- : DefaultSaveFileManager(defaultSavepath) {
-}
-*/
-#if defined(UNIX)
void POSIXSaveFileManager::checkPath(const Common::FSNode &dir) {
const Common::String path = dir.getPath();
clearError();
@@ -129,6 +148,5 @@ void POSIXSaveFileManager::checkPath(const Common::FSNode &dir) {
}
}
}
-#endif
#endif
diff --git a/backends/saves/posix/posix-saves.h b/backends/saves/posix/posix-saves.h
index a2543a54fa..160075d3db 100644
--- a/backends/saves/posix/posix-saves.h
+++ b/backends/saves/posix/posix-saves.h
@@ -18,9 +18,6 @@
* 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$
- *
*/
#if !defined(BACKEND_POSIX_SAVES_H) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
@@ -28,7 +25,7 @@
#include "backends/saves/default/default-saves.h"
-#if defined(UNIX)
+#if defined(POSIX) && !defined(DISABLE_DEFAULT_SAVEFILEMANAGER)
/**
* Customization of the DefaultSaveFileManager for POSIX platforms.
* The only two differences are that the default constructor sets
@@ -38,7 +35,6 @@
class POSIXSaveFileManager : public DefaultSaveFileManager {
public:
POSIXSaveFileManager();
-// POSIXSaveFileManager(const Common::String &defaultSavepath);
protected:
/**
diff --git a/backends/saves/psp/psp-saves.cpp b/backends/saves/psp/psp-saves.cpp
index 66c63dfdea..006a4e815d 100644
--- a/backends/saves/psp/psp-saves.cpp
+++ b/backends/saves/psp/psp-saves.cpp
@@ -18,11 +18,22 @@
* 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$
- *
*/
+// 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/psp/psp-saves.h b/backends/saves/psp/psp-saves.h
index d987f935a9..de2d8a693e 100644
--- a/backends/saves/psp/psp-saves.h
+++ b/backends/saves/psp/psp-saves.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef BACKEND_PSP_SAVES_H
diff --git a/backends/saves/savefile.cpp b/backends/saves/savefile.cpp
index 7b7d6b0c0c..edfdd9bc20 100644
--- a/backends/saves/savefile.cpp
+++ b/backends/saves/savefile.cpp
@@ -18,16 +18,11 @@
* 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/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.cpp b/backends/timer/default/default-timer.cpp
index b5060c4c8d..8480fcc7ee 100644
--- a/backends/timer/default/default-timer.cpp
+++ b/backends/timer/default/default-timer.cpp
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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/scummsys.h"
diff --git a/backends/timer/default/default-timer.h b/backends/timer/default/default-timer.h
index a4c7385ef9..66d2e3b091 100644
--- a/backends/timer/default/default-timer.h
+++ b/backends/timer/default/default-timer.h
@@ -17,9 +17,6 @@
* You should have received a copy of the GNU General Public 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 BACKENDS_TIMER_DEFAULT_H
@@ -28,8 +25,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..ce998436e0 100644
--- a/backends/timer/psp/timer.cpp
+++ b/backends/timer/psp/timer.cpp
@@ -18,11 +18,22 @@
* 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$
- *
*/
+// 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/psp/timer.h b/backends/timer/psp/timer.h
index b2b9e8c811..76eebfd6a4 100644
--- a/backends/timer/psp/timer.h
+++ b/backends/timer/psp/timer.h
@@ -18,9 +18,6 @@
* 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_TIMER_H
diff --git a/backends/timer/sdl/sdl-timer.cpp b/backends/timer/sdl/sdl-timer.cpp
index 0a4cd428de..33596f4bd8 100644
--- a/backends/timer/sdl/sdl-timer.cpp
+++ b/backends/timer/sdl/sdl-timer.cpp
@@ -19,9 +19,6 @@
* 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/scummsys.h"
@@ -30,6 +27,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/timer/sdl/sdl-timer.h b/backends/timer/sdl/sdl-timer.h
index 8c609d728d..069a266e45 100644
--- a/backends/timer/sdl/sdl-timer.h
+++ b/backends/timer/sdl/sdl-timer.h
@@ -18,9 +18,6 @@
* 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 BACKENDS_TIMER_SDL_H
diff --git a/backends/vkeybd/image-map.cpp b/backends/vkeybd/image-map.cpp
index b0a77b5220..275ec865ed 100644
--- a/backends/vkeybd/image-map.cpp
+++ b/backends/vkeybd/image-map.cpp
@@ -18,15 +18,14 @@
* 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/scummsys.h"
#ifdef ENABLE_VKEYBD
+#include "common/textconsole.h"
+
#include "backends/vkeybd/image-map.h"
#include "backends/vkeybd/polygon.h"
diff --git a/backends/vkeybd/image-map.h b/backends/vkeybd/image-map.h
index 269ad265cd..020bf70c67 100644
--- a/backends/vkeybd/image-map.h
+++ b/backends/vkeybd/image-map.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef COMMON_IMAGEMAP_H
diff --git a/backends/vkeybd/packs/vkeybd_default.zip b/backends/vkeybd/packs/vkeybd_default.zip
index 94c4649768..960e943152 100644
--- a/backends/vkeybd/packs/vkeybd_default.zip
+++ b/backends/vkeybd/packs/vkeybd_default.zip
Binary files differ
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/polygon.cpp b/backends/vkeybd/polygon.cpp
index 8becbed585..ac42cb1d2e 100644
--- a/backends/vkeybd/polygon.cpp
+++ b/backends/vkeybd/polygon.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
diff --git a/backends/vkeybd/polygon.h b/backends/vkeybd/polygon.h
index 8b5bd5c1cc..bc76dfb4d7 100644
--- a/backends/vkeybd/polygon.h
+++ b/backends/vkeybd/polygon.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef COMMON_POLYGON_H
diff --git a/backends/vkeybd/virtual-keyboard-gui.cpp b/backends/vkeybd/virtual-keyboard-gui.cpp
index c5ab39e46b..1c05d62316 100644
--- a/backends/vkeybd/virtual-keyboard-gui.cpp
+++ b/backends/vkeybd/virtual-keyboard-gui.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -36,7 +33,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 +130,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 +160,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 +200,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 +262,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 +355,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-gui.h b/backends/vkeybd/virtual-keyboard-gui.h
index 9bced3aa9b..e3798569fb 100644
--- a/backends/vkeybd/virtual-keyboard-gui.h
+++ b/backends/vkeybd/virtual-keyboard-gui.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
-* $URL$
-* $Id$
-*
*/
#ifndef COMMON_VIRTUAL_KEYBOARD_GUI_H
diff --git a/backends/vkeybd/virtual-keyboard-parser.cpp b/backends/vkeybd/virtual-keyboard-parser.cpp
index a81258b25f..e2b35132dc 100644
--- a/backends/vkeybd/virtual-keyboard-parser.cpp
+++ b/backends/vkeybd/virtual-keyboard-parser.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -84,7 +81,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..a5d0e0e4f1 100644
--- a/backends/vkeybd/virtual-keyboard-parser.h
+++ b/backends/vkeybd/virtual-keyboard-parser.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef COMMON_VIRTUAL_KEYBOARD_PARSER_H
@@ -51,7 +48,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..afdb800562 100644
--- a/backends/vkeybd/virtual-keyboard.cpp
+++ b/backends/vkeybd/virtual-keyboard.cpp
@@ -18,9 +18,6 @@
* 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/scummsys.h"
@@ -33,6 +30,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 +69,7 @@ void VirtualKeyboard::reset() {
deleteEvents();
_modes.clear();
_initialMode = _currentMode = 0;
- _hAlignment = kAlignCentre;
+ _hAlignment = kAlignCenter;
_vAlignment = kAlignBottom;
_keyQueue.clear();
_loaded = false;
@@ -136,7 +134,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..4936275e23 100644
--- a/backends/vkeybd/virtual-keyboard.h
+++ b/backends/vkeybd/virtual-keyboard.h
@@ -18,9 +18,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL$
- * $Id$
- *
*/
#ifndef COMMON_VIRTUAL_KEYBOARD_H
@@ -134,7 +131,7 @@ protected:
enum HorizontalAlignment {
kAlignLeft,
- kAlignCentre,
+ kAlignCenter,
kAlignRight
};