aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--Makefile.common4
-rw-r--r--NEWS32
-rw-r--r--README12
-rw-r--r--backends/events/default/default-events.cpp8
-rw-r--r--backends/events/default/default-events.h8
-rw-r--r--backends/fs/abstract-fs-factory.cpp6
-rw-r--r--backends/fs/abstract-fs.h46
-rw-r--r--backends/fs/amigaos4/amigaos4-fs-factory.h10
-rw-r--r--backends/fs/amigaos4/amigaos4-fs.cpp68
-rw-r--r--backends/fs/dc/dc-fs.cpp22
-rw-r--r--backends/fs/dc/ronincd-fs-factory.h10
-rw-r--r--backends/fs/ds/ds-fs-factory.h10
-rw-r--r--backends/fs/ds/ds-fs.cpp202
-rw-r--r--backends/fs/ds/ds-fs.h44
-rw-r--r--backends/fs/gp32/gp32-fs-factory.h10
-rw-r--r--backends/fs/gp32/gp32-fs.cpp22
-rw-r--r--backends/fs/morphos/abox-fs-factory.h10
-rw-r--r--backends/fs/morphos/abox-fs.cpp26
-rw-r--r--backends/fs/palmos/palmos-fs-factory.h10
-rw-r--r--backends/fs/palmos/palmos-fs.cpp34
-rw-r--r--backends/fs/posix/posix-fs-factory.h8
-rw-r--r--backends/fs/posix/posix-fs.cpp32
-rw-r--r--backends/fs/ps2/ps2-fs-factory.h10
-rw-r--r--backends/fs/ps2/ps2-fs.cpp22
-rw-r--r--backends/fs/psp/psp-fs-factory.h10
-rw-r--r--backends/fs/psp/psp-fs.cpp42
-rw-r--r--backends/fs/symbian/symbian-fs-factory.h10
-rw-r--r--backends/fs/symbian/symbian-fs.cpp50
-rw-r--r--backends/fs/windows/windows-fs-factory.h10
-rw-r--r--backends/fs/windows/windows-fs.cpp2
-rw-r--r--backends/midi/dmedia.cpp8
-rw-r--r--backends/midi/timidity.cpp6
-rw-r--r--backends/module.mk2
-rw-r--r--backends/platform/PalmOS/Src/base_event.cpp14
-rw-r--r--backends/platform/PalmOS/Src/base_gfx.cpp4
-rw-r--r--backends/platform/PalmOS/Src/base_mouse.cpp6
-rw-r--r--backends/platform/PalmOS/Src/be_base.cpp14
-rw-r--r--backends/platform/PalmOS/Src/be_base.h36
-rw-r--r--backends/platform/PalmOS/Src/be_os5.cpp6
-rw-r--r--backends/platform/PalmOS/Src/be_os5.h4
-rw-r--r--backends/platform/PalmOS/Src/be_os5ex.cpp2
-rw-r--r--backends/platform/PalmOS/Src/be_zodiac.cpp2
-rw-r--r--backends/platform/PalmOS/Src/be_zodiac.h4
-rw-r--r--backends/platform/PalmOS/Src/cd_aeroplayer.cpp14
-rw-r--r--backends/platform/PalmOS/Src/cd_aeroplayer.h6
-rw-r--r--backends/platform/PalmOS/Src/cd_msa.cpp28
-rw-r--r--backends/platform/PalmOS/Src/cd_msa.h2
-rw-r--r--backends/platform/PalmOS/Src/cd_pockettunes.cpp22
-rw-r--r--backends/platform/PalmOS/Src/cd_pockettunes.h26
-rw-r--r--backends/platform/PalmOS/Src/cdaudio.h6
-rw-r--r--backends/platform/PalmOS/Src/extend.cpp2
-rw-r--r--backends/platform/PalmOS/Src/init_golcd.cpp6
-rw-r--r--backends/platform/PalmOS/Src/init_palmos.cpp4
-rw-r--r--backends/platform/PalmOS/Src/init_sony.cpp4
-rw-r--r--backends/platform/PalmOS/Src/init_stuffs.cpp2
-rw-r--r--backends/platform/PalmOS/Src/launcher/app.cpp22
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formCards.cpp16
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formEditGame.cpp40
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formMisc.cpp12
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp8
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/forminfo.cpp8
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formmain.cpp4
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp2
-rw-r--r--backends/platform/PalmOS/Src/launcher/forms/formtabs.cpp10
-rw-r--r--backends/platform/PalmOS/Src/launcher/games.cpp28
-rw-r--r--backends/platform/PalmOS/Src/launcher/launch.cpp18
-rw-r--r--backends/platform/PalmOS/Src/launcher/skin.cpp20
-rw-r--r--backends/platform/PalmOS/Src/launcher/start.cpp20
-rw-r--r--backends/platform/PalmOS/Src/launcher/start.h4
-rw-r--r--backends/platform/PalmOS/Src/modules.cpp4
-rw-r--r--backends/platform/PalmOS/Src/native/pace.h10
-rw-r--r--backends/platform/PalmOS/Src/native/zodiacARM.cpp18
-rw-r--r--backends/platform/PalmOS/Src/os5_gfx.cpp8
-rw-r--r--backends/platform/PalmOS/Src/os5_mouse.cpp8
-rw-r--r--backends/platform/PalmOS/Src/os5_sound.cpp4
-rw-r--r--backends/platform/PalmOS/Src/prefixes/compile.h2
-rw-r--r--backends/platform/PalmOS/Src/zodiac_event.cpp2
-rw-r--r--backends/platform/PalmOS/Src/zodiac_gfx.cpp12
-rw-r--r--backends/platform/PalmOS/Src/zodiac_mouse.cpp2
-rw-r--r--backends/platform/PalmOS/Src/zodiac_overlay.cpp2
-rw-r--r--backends/platform/dc/cache.S2
-rw-r--r--backends/platform/dc/display.cpp2
-rw-r--r--backends/platform/dc/selector.cpp6
-rw-r--r--backends/platform/ds/arm7/Makefile80
-rw-r--r--backends/platform/ds/arm7/source/libcartreset/cartreset.c2
-rw-r--r--backends/platform/ds/arm7/source/libcartreset/cartreset_nolibfat.h2
-rw-r--r--backends/platform/ds/arm7/source/main.cpp188
-rw-r--r--backends/platform/ds/arm9/makefile48
-rw-r--r--backends/platform/ds/arm9/source/blitters.cpp108
-rw-r--r--backends/platform/ds/arm9/source/blitters.h8
-rw-r--r--backends/platform/ds/arm9/source/blitters.s28
-rw-r--r--backends/platform/ds/arm9/source/cdaudio.cpp166
-rw-r--r--backends/platform/ds/arm9/source/cdaudio.h2
-rw-r--r--backends/platform/ds/arm9/source/console2.h4
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp542
-rw-r--r--backends/platform/ds/arm9/source/dsmain.h2
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.cpp26
-rw-r--r--backends/platform/ds/arm9/source/dsoptions.h6
-rw-r--r--backends/platform/ds/arm9/source/fat/disc_io.c40
-rw-r--r--backends/platform/ds/arm9/source/fat/disc_io.h6
-rw-r--r--backends/platform/ds/arm9/source/fat/gba_nds_fat.c510
-rw-r--r--backends/platform/ds/arm9/source/fat/gba_nds_fat.h28
-rw-r--r--backends/platform/ds/arm9/source/fat/io_dldi.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_dldi.s14
-rw-r--r--backends/platform/ds/arm9/source/fat/io_efa2.c28
-rw-r--r--backends/platform/ds/arm9/source/fat/io_fcsr.c16
-rw-r--r--backends/platform/ds/arm9/source/fat/io_fcsr.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_m3_common.c10
-rw-r--r--backends/platform/ds/arm9/source/fat/io_m3_common.h6
-rw-r--r--backends/platform/ds/arm9/source/fat/io_m3cf.c54
-rw-r--r--backends/platform/ds/arm9/source/fat/io_m3cf.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_m3sd.c4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_m3sd_asm.s26
-rw-r--r--backends/platform/ds/arm9/source/fat/io_mmcf.c26
-rw-r--r--backends/platform/ds/arm9/source/fat/io_mmcf.h2
-rw-r--r--backends/platform/ds/arm9/source/fat/io_mpcf.c52
-rw-r--r--backends/platform/ds/arm9/source/fat/io_mpcf.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_njsd.c78
-rw-r--r--backends/platform/ds/arm9/source/fat/io_njsd.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_nmmc.c58
-rw-r--r--backends/platform/ds/arm9/source/fat/io_nmmc.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_sccf.c2
-rw-r--r--backends/platform/ds/arm9/source/fat/io_sccf.h4
-rw-r--r--backends/platform/ds/arm9/source/fat/io_scsd.c10
-rw-r--r--backends/platform/ds/arm9/source/fat/io_scsd.h8
-rw-r--r--backends/platform/ds/arm9/source/fat/io_scsd_asm.s112
-rw-r--r--backends/platform/ds/arm9/source/fat/io_sd_common.c58
-rw-r--r--backends/platform/ds/arm9/source/fat/io_sd_common.h10
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.cpp48
-rw-r--r--backends/platform/ds/arm9/source/gbampsave.h18
-rw-r--r--backends/platform/ds/arm9/source/keys.cpp16
-rw-r--r--backends/platform/ds/arm9/source/libcartreset/cartreset.c2
-rw-r--r--backends/platform/ds/arm9/source/libcartreset/cartreset_nolibfat.h2
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.cpp82
-rw-r--r--backends/platform/ds/arm9/source/osystem_ds.h30
-rw-r--r--backends/platform/ds/arm9/source/portdefs.h2
-rw-r--r--backends/platform/ds/arm9/source/ramsave.cpp82
-rw-r--r--backends/platform/ds/arm9/source/ramsave.h46
-rw-r--r--backends/platform/ds/arm9/source/scummconsole.c76
-rw-r--r--backends/platform/ds/arm9/source/scummconsole.h2
-rw-r--r--backends/platform/ds/arm9/source/scummhelp.cpp2
-rw-r--r--backends/platform/ds/arm9/source/scummhelp.h4
-rw-r--r--backends/platform/ds/arm9/source/touchkeyboard.cpp102
-rw-r--r--backends/platform/ds/arm9/source/touchkeyboard.h2
-rw-r--r--backends/platform/ds/arm9/source/wordcompletion.cpp16
-rw-r--r--backends/platform/ds/arm9/source/zipreader.cpp62
-rw-r--r--backends/platform/ds/arm9/source/zipreader.h16
-rw-r--r--backends/platform/ds/commoninclude/NDS/scummvm_ipc.h34
-rw-r--r--backends/platform/gp2x/build/bundle.sh4
-rw-r--r--backends/platform/gp2x/build/config.sh10
-rw-r--r--backends/platform/gp2x/module.mk2
-rw-r--r--backends/platform/gp32/gp32_main.cpp2
-rw-r--r--backends/platform/gp32/gp32_osys.cpp10
-rw-r--r--backends/platform/gp32/gp32_osys.h4
-rw-r--r--backends/platform/gp32/gp32std.cpp2
-rw-r--r--backends/platform/gp32/gp32std_input.cpp2
-rw-r--r--backends/platform/gp32/gp32std_sound.cpp2
-rw-r--r--backends/platform/gp32/gp_asmlib.s2
-rw-r--r--backends/platform/gp32/memcpy.S68
-rw-r--r--backends/platform/gp32/portdefs.h4
-rw-r--r--backends/platform/iphone/iphone_common.h2
-rw-r--r--backends/platform/iphone/iphone_main.m14
-rw-r--r--backends/platform/iphone/iphone_video.m72
-rw-r--r--backends/platform/iphone/module.mk2
-rw-r--r--backends/platform/iphone/osys_iphone.cpp118
-rw-r--r--backends/platform/iphone/osys_iphone.h6
-rw-r--r--backends/platform/maemo/hildon.cpp10
-rw-r--r--backends/platform/maemo/main.cpp10
-rw-r--r--backends/platform/maemo/portdefs.h2
-rw-r--r--backends/platform/maemo/scummvm-0.11.0-maemo.patch22
-rw-r--r--backends/platform/ps2/Gs2dScreen.cpp10
-rw-r--r--backends/platform/ps2/cd.c8
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c4
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c6
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst10
-rw-r--r--backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c2
-rw-r--r--backends/platform/ps2/irxboot.cpp4
-rw-r--r--backends/platform/ps2/savefile.cpp4
-rw-r--r--backends/platform/ps2/savefile.h2
-rw-r--r--backends/platform/ps2/systemps2.cpp8
-rw-r--r--backends/platform/psp/Makefile6
-rw-r--r--backends/platform/psp/README.PSP6
-rw-r--r--backends/platform/psp/kbd_l_c.cpp410
-rw-r--r--backends/platform/psp/kbd_ls_c.cpp432
-rw-r--r--backends/platform/psp/kbd_s_c.cpp396
-rw-r--r--backends/platform/psp/kbd_ss_c.cpp408
-rw-r--r--backends/platform/psp/osys_psp.cpp52
-rw-r--r--backends/platform/psp/osys_psp.h6
-rw-r--r--backends/platform/psp/osys_psp_gu.cpp68
-rw-r--r--backends/platform/psp/osys_psp_gu.h2
-rw-r--r--backends/platform/psp/portdefs.h2
-rw-r--r--backends/platform/psp/psp_main.cpp6
-rw-r--r--backends/platform/psp/trace.cpp8
-rw-r--r--backends/platform/sdl/graphics.cpp10
-rw-r--r--backends/platform/sdl/main.cpp2
-rw-r--r--backends/platform/sdl/sdl.cpp4
-rw-r--r--backends/platform/symbian/AdaptAllMMPs.pl120
-rw-r--r--backends/platform/symbian/BuildPackageUpload_AllVersions.pl76
-rw-r--r--backends/platform/symbian/BuildPackageUpload_LocalSettings.pl70
-rw-r--r--backends/platform/symbian/README70
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60.mmp.in10
-rw-r--r--backends/platform/symbian/S60/ScummVM_S60_App.mmp4
-rw-r--r--backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg6
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_Loc.rss4
-rw-r--r--backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in14
-rw-r--r--backends/platform/symbian/S60v3/icons.mk4
-rw-r--r--backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg6
-rw-r--r--backends/platform/symbian/S60v3/scummvm_reg.rss8
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80.mmp.in10
-rw-r--r--backends/platform/symbian/S80/ScummVM_S80_App.mmp4
-rw-r--r--backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg6
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90.mmp.in12
-rw-r--r--backends/platform/symbian/S90/Scummvm_S90_App.mmp6
-rw-r--r--backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg6
-rw-r--r--backends/platform/symbian/UIQ2/ScummVM.rss4
-rw-r--r--backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in12
-rw-r--r--backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg6
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM.rss4
-rw-r--r--backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in18
-rw-r--r--backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg6
-rw-r--r--backends/platform/symbian/UIQ3/scummvm_loc.rss66
-rw-r--r--backends/platform/symbian/UIQ3/scummvm_reg.rss8
-rw-r--r--backends/platform/symbian/mmp/scummvm_base.mmp.in4
-rw-r--r--backends/platform/symbian/mmp/scummvm_igor.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_lure.mmp.in2
-rw-r--r--backends/platform/symbian/mmp/scummvm_scumm.mmp.in2
-rw-r--r--backends/platform/symbian/res/ScummVmAif.rss2
-rw-r--r--backends/platform/symbian/res/scummvm.rss8
-rw-r--r--backends/platform/symbian/src/ScummApp.cpp4
-rw-r--r--backends/platform/symbian/src/SymbianActions.cpp32
-rw-r--r--backends/platform/symbian/src/SymbianOS.cpp68
-rw-r--r--backends/platform/symbian/src/main_features.inl2
-rw-r--r--backends/platform/symbian/src/portdefs.h20
-rw-r--r--backends/platform/wince/CEActionsPocket.cpp2
-rw-r--r--backends/platform/wince/CEActionsSmartphone.cpp2
-rw-r--r--backends/platform/wince/CEDevice.cpp4
-rw-r--r--backends/platform/wince/CEScaler.cpp10
-rw-r--r--backends/platform/wince/Makefile12
-rw-r--r--backends/platform/wince/README-WinCE.txt96
-rw-r--r--backends/platform/wince/missing/missing.cpp6
-rw-r--r--backends/platform/wince/missing/time.h2
-rw-r--r--backends/platform/wince/stub.cpp2
-rw-r--r--backends/platform/wince/wince-sdl.cpp40
-rw-r--r--backends/platform/x11/x11.cpp6
-rw-r--r--backends/plugins/dc/dc-provider.cpp16
-rw-r--r--backends/plugins/dynamic-plugin.h14
-rw-r--r--backends/plugins/posix/posix-provider.cpp14
-rw-r--r--backends/plugins/sdl/sdl-provider.cpp14
-rw-r--r--backends/plugins/win32/win32-provider.cpp12
-rw-r--r--backends/saves/default/default-saves.cpp14
-rw-r--r--backends/saves/default/default-saves.h2
-rw-r--r--backends/saves/savefile.cpp2
-rw-r--r--backends/timer/default/default-timer.h4
-rw-r--r--base/module.mk2
-rw-r--r--common/config-manager.cpp2
-rw-r--r--common/config-manager.h6
-rw-r--r--common/endian.h2
-rw-r--r--common/events.h14
-rw-r--r--common/file.cpp28
-rw-r--r--common/fs.cpp2
-rw-r--r--common/fs.h50
-rw-r--r--common/func.h2
-rw-r--r--common/hashmap.h2
-rw-r--r--common/keyboard.h6
-rw-r--r--common/list.h18
-rw-r--r--common/md5.cpp4
-rw-r--r--common/md5.h2
-rw-r--r--common/module.mk2
-rw-r--r--common/savefile.h6
-rw-r--r--common/str.h14
-rw-r--r--common/system.h14
-rw-r--r--common/util.h10
-rwxr-xr-xconfigure32
-rw-r--r--dists/debian/changelog4
-rwxr-xr-xdists/debian/prepare2
-rw-r--r--dists/redhat/README2
-rw-r--r--dists/redhat/scummvm-tools.spec2
-rw-r--r--dists/redhat/scummvm.spec8
-rw-r--r--dists/redhat/scummvm.spec.in8
-rw-r--r--dists/scummvm.610
-rwxr-xr-xdists/slackware/scummvm.SlackBuild4
-rwxr-xr-xdists/slackware/scummvm.SlackBuild.in4
-rw-r--r--dists/slackware/slack-desc8
-rw-r--r--engines/agi/agi.cpp2
-rw-r--r--engines/agi/menu.h2
-rw-r--r--engines/agi/preagi_mickey.cpp4
-rw-r--r--engines/agi/preagi_mickey.h12
-rw-r--r--engines/agi/preagi_troll.cpp32
-rw-r--r--engines/agi/preagi_troll.h2
-rw-r--r--engines/agi/preagi_winnie.cpp32
-rw-r--r--engines/agi/predictive.cpp6
-rw-r--r--engines/agi/sound.h4
-rw-r--r--engines/agi/sprite.cpp2
-rw-r--r--engines/agi/sprite.h6
-rw-r--r--engines/agi/text.cpp2
-rw-r--r--engines/agi/view.cpp2
-rw-r--r--engines/agi/wagparser.h38
-rw-r--r--engines/agos/agos.cpp2
-rw-r--r--engines/agos/agos.h6
-rw-r--r--engines/agos/animation.h2
-rw-r--r--engines/agos/intern.h2
-rw-r--r--engines/agos/module.mk2
-rw-r--r--engines/agos/script_e2.cpp2
-rw-r--r--engines/cine/module.mk2
-rw-r--r--engines/cruise/actor.cpp6
-rw-r--r--engines/cruise/background.cpp2
-rw-r--r--engines/cruise/backgroundIncrust.cpp6
-rw-r--r--engines/cruise/cell.cpp2
-rw-r--r--engines/cruise/cruise_main.cpp16
-rw-r--r--engines/cruise/ctp.cpp6
-rw-r--r--engines/cruise/dataLoader.cpp4
-rw-r--r--engines/cruise/decompiler.cpp8
-rw-r--r--engines/cruise/function.cpp6
-rw-r--r--engines/cruise/mainDraw.cpp18
-rw-r--r--engines/cruise/module.mk2
-rw-r--r--engines/cruise/mouse.cpp2
-rw-r--r--engines/cruise/overlay.cpp12
-rw-r--r--engines/cruise/perso.cpp2
-rw-r--r--engines/cruise/saveload.cpp2
-rw-r--r--engines/cruise/vars.h2
-rw-r--r--engines/drascula/drascula.cpp242
-rw-r--r--engines/gob/coktelvideo.h4
-rw-r--r--engines/gob/game.h2
-rw-r--r--engines/gob/goblin.cpp4
-rw-r--r--engines/gob/map.h4
-rw-r--r--engines/gob/module.mk2
-rw-r--r--engines/gob/mult.h2
-rw-r--r--engines/gob/music.h2
-rw-r--r--engines/gob/parse.h2
-rw-r--r--engines/gob/scenery.h4
-rw-r--r--engines/gob/sound.h4
-rw-r--r--engines/igor/parts/part_05.cpp2
-rw-r--r--engines/igor/parts/part_17.cpp2
-rw-r--r--engines/igor/parts/part_21.cpp4
-rw-r--r--engines/kyra/animator_v1.h4
-rw-r--r--engines/kyra/animator_v2.cpp30
-rw-r--r--engines/kyra/debugger.cpp2
-rw-r--r--engines/kyra/gui_v1.cpp86
-rw-r--r--engines/kyra/gui_v2.cpp40
-rw-r--r--engines/kyra/items_v1.cpp150
-rw-r--r--engines/kyra/items_v2.cpp22
-rw-r--r--engines/kyra/kyra.cpp2
-rw-r--r--engines/kyra/kyra.h38
-rw-r--r--engines/kyra/kyra_v1.cpp108
-rw-r--r--engines/kyra/kyra_v1.h88
-rw-r--r--engines/kyra/kyra_v2.cpp12
-rw-r--r--engines/kyra/kyra_v2.h2
-rw-r--r--engines/kyra/kyra_v3.cpp60
-rw-r--r--engines/kyra/kyra_v3.h6
-rw-r--r--engines/kyra/module.mk2
-rw-r--r--engines/kyra/resource.cpp6
-rw-r--r--engines/kyra/scene.cpp48
-rw-r--r--engines/kyra/scene_v1.cpp200
-rw-r--r--engines/kyra/scene_v2.cpp232
-rw-r--r--engines/kyra/screen.cpp4
-rw-r--r--engines/kyra/screen.h22
-rw-r--r--engines/kyra/screen_v1.h8
-rw-r--r--engines/kyra/screen_v2.cpp12
-rw-r--r--engines/kyra/screen_v2.h26
-rw-r--r--engines/kyra/script.h16
-rw-r--r--engines/kyra/script_v2.cpp48
-rw-r--r--engines/kyra/seqplayer.h2
-rw-r--r--engines/kyra/sequences_v1.cpp216
-rw-r--r--engines/kyra/sequences_v2.cpp12
-rw-r--r--engines/kyra/sound.cpp4
-rw-r--r--engines/kyra/sound_digital.cpp48
-rw-r--r--engines/kyra/sound_v1.cpp2
-rw-r--r--engines/kyra/sprites.h4
-rw-r--r--engines/kyra/staticres.cpp8
-rw-r--r--engines/kyra/text.h2
-rw-r--r--engines/kyra/text_v1.cpp24
-rw-r--r--engines/kyra/text_v2.cpp60
-rw-r--r--engines/kyra/timer.cpp24
-rw-r--r--engines/kyra/timer.h20
-rw-r--r--engines/kyra/timer_v1.cpp12
-rw-r--r--engines/kyra/timer_v2.cpp6
-rw-r--r--engines/kyra/util.h8
-rw-r--r--engines/kyra/wsamovie.h14
-rw-r--r--engines/lure/animseq.cpp30
-rw-r--r--engines/lure/animseq.h2
-rw-r--r--engines/lure/debugger.cpp6
-rw-r--r--engines/lure/decode.cpp22
-rw-r--r--engines/lure/decode.h2
-rw-r--r--engines/lure/fights.cpp64
-rw-r--r--engines/lure/game.cpp92
-rw-r--r--engines/lure/hotspots.cpp380
-rw-r--r--engines/lure/hotspots.h94
-rw-r--r--engines/lure/intro.cpp24
-rw-r--r--engines/lure/lure.cpp12
-rw-r--r--engines/lure/lure.h2
-rw-r--r--engines/lure/luredefs.h2
-rw-r--r--engines/lure/menu.cpp40
-rw-r--r--engines/lure/module.mk2
-rw-r--r--engines/lure/palette.cpp8
-rw-r--r--engines/lure/palette.h2
-rw-r--r--engines/lure/res.cpp40
-rw-r--r--engines/lure/res.h12
-rw-r--r--engines/lure/res_struct.cpp118
-rw-r--r--engines/lure/res_struct.h48
-rw-r--r--engines/lure/room.cpp72
-rw-r--r--engines/lure/screen.cpp8
-rw-r--r--engines/lure/scripts.cpp96
-rw-r--r--engines/lure/sound.cpp40
-rw-r--r--engines/lure/sound.h2
-rw-r--r--engines/lure/strings.cpp32
-rw-r--r--engines/lure/surface.cpp112
-rw-r--r--engines/lure/surface.h4
-rw-r--r--engines/module.mk2
-rw-r--r--engines/queen/defs.h2
-rw-r--r--engines/queen/display.cpp4
-rw-r--r--engines/queen/xref.txt6
-rw-r--r--engines/saga/actor.cpp28
-rw-r--r--engines/saga/actor.h2
-rw-r--r--engines/saga/actor_path.cpp8
-rw-r--r--engines/saga/actor_walk.cpp6
-rw-r--r--engines/saga/animation.cpp12
-rw-r--r--engines/saga/console.cpp2
-rw-r--r--engines/saga/detection.cpp6
-rw-r--r--engines/saga/detection_tables.h2
-rw-r--r--engines/saga/font.cpp2
-rw-r--r--engines/saga/font.h4
-rw-r--r--engines/saga/ihnm_introproc.cpp4
-rw-r--r--engines/saga/interface.cpp20
-rw-r--r--engines/saga/ite_introproc.cpp4
-rw-r--r--engines/saga/module.mk2
-rw-r--r--engines/saga/music.cpp6
-rw-r--r--engines/saga/objectmap.cpp2
-rw-r--r--engines/saga/puzzle.cpp2
-rw-r--r--engines/saga/rscfile.cpp20
-rw-r--r--engines/saga/rscfile.h2
-rw-r--r--engines/saga/saga.h8
-rw-r--r--engines/saga/sagaresnames.h2
-rw-r--r--engines/saga/scene.cpp4
-rw-r--r--engines/saga/script.cpp8
-rw-r--r--engines/saga/sfuncs.cpp8
-rw-r--r--engines/saga/sndres.cpp6
-rw-r--r--engines/saga/sprite.cpp2
-rw-r--r--engines/saga/xref.txt2
-rw-r--r--engines/scumm/cursor.cpp2
-rw-r--r--engines/scumm/detection.h12
-rw-r--r--engines/scumm/dialogs.cpp2
-rw-r--r--engines/scumm/dialogs.h4
-rw-r--r--engines/scumm/file_nes.cpp2
-rw-r--r--engines/scumm/gfx.cpp2
-rw-r--r--engines/scumm/he/animation_he.h2
-rw-r--r--engines/scumm/he/resource_he.h2
-rw-r--r--engines/scumm/he/script_v72he.cpp2
-rw-r--r--engines/scumm/he/sound_he.h2
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.cpp2
-rw-r--r--engines/scumm/imuse_digi/dimuse_track.h2
-rw-r--r--engines/scumm/intern.h10
-rw-r--r--engines/scumm/module.mk2
-rw-r--r--engines/scumm/object.h2
-rw-r--r--engines/scumm/saveload.cpp6
-rw-r--r--engines/scumm/script_v6.cpp2
-rw-r--r--engines/scumm/scumm.h6
-rw-r--r--engines/scumm/sound.cpp4
-rw-r--r--engines/scumm/verbs.cpp2
-rw-r--r--engines/sky/module.mk2
-rw-r--r--engines/sky/music/adlibchannel.h4
-rw-r--r--engines/sky/music/gmchannel.cpp2
-rw-r--r--engines/sky/music/mt32music.cpp8
-rw-r--r--engines/sky/music/musicbase.cpp6
-rw-r--r--engines/sword1/animation.h4
-rw-r--r--engines/sword1/module.mk2
-rw-r--r--engines/sword1/resman.h2
-rw-r--r--engines/sword2/header.h2
-rw-r--r--engines/sword2/module.mk2
-rw-r--r--engines/sword2/mouse.h2
-rw-r--r--engines/sword2/object.h2
-rw-r--r--graphics/colormasks.h14
-rw-r--r--graphics/module.mk2
-rw-r--r--graphics/scaler.cpp4
-rw-r--r--graphics/scaler/hq2x_i386.asm12
-rw-r--r--graphics/scaler/hq3x_i386.asm14
-rw-r--r--gui/ThemeClassic.cpp14
-rw-r--r--gui/ThemeClassic.h2
-rw-r--r--gui/ThemeModern.cpp70
-rw-r--r--gui/ThemeModern.h78
-rw-r--r--gui/console.h26
-rw-r--r--gui/debugger.h8
-rw-r--r--gui/massadd.h2
-rw-r--r--gui/module.mk2
-rw-r--r--gui/newgui.h2
-rw-r--r--gui/options.h2
-rw-r--r--gui/theme-config.cpp6
-rw-r--r--gui/theme.cpp10
-rw-r--r--gui/theme.h2
-rw-r--r--rules.mk2
-rw-r--r--sound/adpcm.h2
-rw-r--r--sound/flac.cpp20
-rw-r--r--sound/mididrv.h8
-rw-r--r--sound/mods/infogrames.cpp4
-rw-r--r--sound/mods/paula.cpp10
-rw-r--r--sound/mods/paula.h4
-rw-r--r--sound/mp3.cpp34
-rw-r--r--sound/softsynth/adlib.cpp4
-rw-r--r--sound/softsynth/mt32/module.mk2
-rw-r--r--sound/softsynth/mt32/structures.h8
-rw-r--r--sound/softsynth/ym2612.cpp20
-rw-r--r--sound/vorbis.cpp14
-rw-r--r--test/common/hashmap.h2
-rw-r--r--test/common/list.h2
-rw-r--r--test/common/pack.h2
-rw-r--r--test/module.mk2
-rw-r--r--tools/README14
-rw-r--r--tools/agi-palex.py12
-rw-r--r--tools/convbdf.c44
-rw-r--r--tools/create_kyradat/Makefile4
-rw-r--r--tools/create_kyradat/create_kyradat.cpp100
-rw-r--r--tools/create_kyradat/create_kyradat.h8
-rw-r--r--tools/create_kyradat/hof_floppy.h2
-rw-r--r--tools/create_kyradat/hof_towns.h2
-rw-r--r--tools/create_kyradat/md5.cpp2
-rw-r--r--tools/create_kyradat/pak.cpp38
-rw-r--r--tools/create_kyradat/pak.h12
-rw-r--r--tools/create_kyradat/towns.h16
-rw-r--r--tools/create_kyradat/util.h2
-rw-r--r--tools/create_lure/create_lure_dat.cpp284
-rw-r--r--tools/create_lure/create_lure_dat.h12
-rw-r--r--tools/create_lure/process_actions.cpp66
-rwxr-xr-xtools/credits.pl30
-rw-r--r--tools/md5table.c10
-rw-r--r--tools/module.mk2
-rw-r--r--tools/skycpt/KmpSearch.cpp8
-rw-r--r--tools/skycpt/ReadMe.txt2
-rw-r--r--tools/skycpt/cptcompiler.cpp12
-rw-r--r--tools/skycpt/idFinder.cpp2
-rwxr-xr-xtools/update-version.pl4
530 files changed, 6448 insertions, 6448 deletions
diff --git a/Makefile b/Makefile
index b0e4900e3c..db7e2582f5 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ MODULE_DIRS :=
CXXFLAGS:= -Wall $(CXXFLAGS)
# Turn off some annoying and not-so-useful warnings
-CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
+CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder
# Enable even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wconversion
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings
diff --git a/Makefile.common b/Makefile.common
index 965f73dd42..8f7afcc372 100644
--- a/Makefile.common
+++ b/Makefile.common
@@ -52,7 +52,7 @@ CPPFLAGS := $(DEFINES) $(INCLUDES)
# Depdir information
DEPDIRS = $(addsuffix $(DEPDIR),$(MODULE_DIRS))
-DEPFILES =
+DEPFILES =
# Make base/version.o depend on all other object files. This way if anything is
# changed, it causes version.cpp to be recompiled. This in turn ensures that
@@ -78,7 +78,7 @@ clean:
ifndef HAVE_GCC3
# If you use GCC, disable the above and enable this for intelligent
-# dependency tracking.
+# dependency tracking.
%.o: %.cpp
$(MKDIR) $(*D)/$(DEPDIR)
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
diff --git a/NEWS b/NEWS
index 5109214502..4e433f392c 100644
--- a/NEWS
+++ b/NEWS
@@ -20,7 +20,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
New Ports:
- Added iPhone port.
- Added Maemo port for Nokia Internet tablets.
-
+
General:
- Added ARM assembly routines for code in the sound mixer and SCUMM
video playback, resulting in some nice speedups on several ports.
@@ -157,7 +157,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
- Improved performance for S60v3 and UIQ3 using ARM target.
- Limited support for pre Symbian OS9 devices due to compiler issues.
- Updated key mapping handling.
-
+
WinCE Port:
- Switched to using a GCC toolchain for building.
- Major update to the SDL lib. Better, faster, more compatible :-)
@@ -274,13 +274,13 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
- Missing data files are handled more gracefully.
WinCE Port:
- - Added: PocketPC: Vertical oversampling scaler 320x200=>320x240 when panel not shown (n0p)
- - Added: PocketPC: Right click by double-tapping (n0p)
- - Fixed: All: Clipping issues in some cases
- - Added: PocketPC: Mouse emulation using keys
- - Added: Smartphones: Virtual keyboard popup
- - Fixed: Smartphones: Incorrect screen blit in SDL port
- - Added: All: Mouse cursor visible on panel if using emulated mouse
+ - Added: PocketPC: Vertical oversampling scaler 320x200=>320x240 when panel not shown (n0p)
+ - Added: PocketPC: Right click by double-tapping (n0p)
+ - Fixed: All: Clipping issues in some cases
+ - Added: PocketPC: Mouse emulation using keys
+ - Added: Smartphones: Virtual keyboard popup
+ - Fixed: Smartphones: Incorrect screen blit in SDL port
+ - Added: All: Mouse cursor visible on panel if using emulated mouse
- Added: All: Inverse landscape mode
- Fixed: PocketPC: Dialogs cut-off/not redrawn
@@ -298,7 +298,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
- Should fix weird crashes with DOTT stamp and in FOA (#1399830 #1392815)
- Fixed Monkey Island blocking keyboard panel on Smartphones (thks Knakos)
- Fixed QVGA Smartphone detection (mean it this time :p)
- - Fixed Smartphone double right click issue.
+ - Fixed Smartphone double right click issue.
0.8.1 (2006-01-31)
General:
@@ -437,12 +437,12 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
SCUMM:
- Fixed wrong actor animation in Full Throttle INSANE
-
+
Windows Mobile port (PocketPC / Smartphone) :
- Fixed FOTAQ crash on all platforms when leaving the hotel AGAIN
- Better low quality Adlib emulation for FOTAQ
- Fix randomly broken Hide Toolbar option (thanks iKi)
- - Fix first hardware key mapping (was not displayed before)
+ - Fix first hardware key mapping (was not displayed before)
- Fix BASS & Simon hangs on Smartphone when using the Skip hotkey
- Fix Zone key action on Smartphone (now mapped on key 9)
- Experimental third party VGA mode (SE-VGA) fix
@@ -494,7 +494,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
file. This removes the need for using the 'RESCUMM' program
- Added smooth horizontal scrolling for The Dig, Full Throttle and COMI
(matching the original engine)
- - Partially rewrote the text engine, fixing various bugs, especially in
+ - Partially rewrote the text engine, fixing various bugs, especially in
newer games (The Dig, COMI)
- Fixed actor drawing glitches in V1 Maniac and Zak
- Fixed ship-to-ship graphic glitches in COMI
@@ -521,7 +521,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
0.6.1b (2004-08-03)
General:
- - Fixed copy/paste bug in launcher that may corrupt the Savegame Path
+ - Fixed copy/paste bug in launcher that may corrupt the Savegame Path
- Fixed crashes on 64-bit architectures
SCUMM:
@@ -602,7 +602,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
- Keyboard support for cannon battle in Curse of Monkey Island
- Keyboard support for derby scene in Full Throttle
-0.5.1 (2003-08-06)
+0.5.1 (2003-08-06)
- Rewrote Beneath a Steel Sky savegame code (see note in READMEs 'Known Bugs')
- Fixed dialog skipping, music volume and several crashes/freezes in Steel Sky
- Fixed dialog skipping in V7 games
@@ -644,7 +644,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see:
- Added support for the EGA versions of Loom, Monkey Island and Indy3
- Improved music support in Indy3 and the floppy versions of Monkey Island
- Many Simon the Sorcerer 1 & 2 improvements and fixes
-- Very pre-alpha Beneath a Steel Sky code. Don't expect it to do anything.
+- Very pre-alpha Beneath a Steel Sky code. Don't expect it to do anything.
- Even more pre-alpha support for V2 SCUMM games (Maniac Mansion and Zak)
- Preliminary support for early Humongous Entertainment titles (very
experimental)
diff --git a/README b/README
index 8e138f43c8..12058c6e60 100644
--- a/README
+++ b/README
@@ -149,12 +149,12 @@ AGI Games by Sierra:
King's Quest II [kq2]
King's Quest III [kq3]
King's Quest IV [kq4]
- Leisure Suit Larry in the Land of the
+ Leisure Suit Larry in the Land of the
Lounge Lizards [lsl1]
Mixed-Up Mother Goose [mixedup]
Manhunter 1: New York [mh1]
Manhunter 2: San Francisco [mh2]
- Police Quest I: In Pursuit of the Death
+ Police Quest I: In Pursuit of the Death
Angel [pq1]
Space Quest I: The Sarien Encounter [sq1]
Space Quest II: Vohaul's Revenge [sq2]
@@ -401,7 +401,7 @@ FLAC and zlib support.
For systems that are too slow to handle the decoding of FLAC audio,
the audio for these cutscenes is also provided separately as OGG Vorbis audio.
Viewing these cutscenes with OGG Vorbis audio requires a version of ScummVM
-compiled with both libVorbis and zlib support.
+compiled with both libVorbis and zlib support.
The cutscenes should be placed in the main game data directory. Note that
currently this requires either copying the game to hard disk or burning
@@ -512,7 +512,7 @@ to note.
Many of the files necessary for the game are stored in an InstallShield file
called data1.cab, which ScummVM is unable to unpack. You will need to use the
-original installer or i5comp to unpack the contents of this file. The i5comp
+original installer or i5comp to unpack the contents of this file. The i5comp
decompression tool, can be found via a search on the internet.
The game uses Smacker cutscenes extensively, which we can't support directly,
@@ -565,7 +565,7 @@ more than one words share the same numeric representation. For example the
words 'quit' and 'suit' map to the same number, namely 7848. In these cases the
(#)next button lights up. By pressing it, you can cycle through the list of
words sharing the same code and finally accept the correct one by pressing
-(0)space or the Ok button.
+(0)space or the Ok button.
The second input method (123) is the numeric input: Each key you press is
entered verbatim as a number.
@@ -1788,7 +1788,7 @@ messages (see http://www.sysinternals.com/ntw2k/freeware/debugview.shtml).
* run 'make config'
* run 'make scummvm'
* create your debian/changelog in top directory
- * run 'make deb' in backends/platform/maemo
+ * run 'make deb' in backends/platform/maemo
------------------------------------------------------------------------
Good Luck and Happy Adventuring!
diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index d5d62b6da0..5b33796eb0 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -60,7 +60,7 @@ void readRecord(Common::InSaveFile *inFile, uint32 &diff, Common::Event &event)
break;
default:
break;
- }
+ }
}
void writeRecord(Common::OutSaveFile *outFile, uint32 diff, Common::Event &event) {
@@ -174,7 +174,7 @@ DefaultEventManager::DefaultEventManager(OSystem *boss) :
// conf vars
ConfMan.setBool("subtitles", _playbackFile->readByte() != 0);
-
+
_recordCount = _playbackFile->readUint32LE();
_recordTimeCount = _playbackFile->readUint32LE();
randomSourceCount = _playbackFile->readUint32LE();
@@ -274,7 +274,7 @@ bool DefaultEventManager::playback(Common::Event &event) {
break;
default:
break;
- }
+ }
event = _playbackEvent;
_hasPlaybackEvent = false;
_lastEventCount = _eventCount;
@@ -361,7 +361,7 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
if (event.type != Common::EVENT_QUIT) {
result = playback(event);
}
- } else {
+ } else {
if (_recordMode == kRecorderRecord) {
if (result) {
record(event);
diff --git a/backends/events/default/default-events.h b/backends/events/default/default-events.h
index 14fe775d73..98dcd4b3de 100644
--- a/backends/events/default/default-events.h
+++ b/backends/events/default/default-events.h
@@ -48,13 +48,13 @@ class DefaultEventManager : public Common::EventManager {
int _buttonState;
int _modifierState;
bool _shouldQuit;
-
+
class RandomSourceRecord {
public:
Common::String name;
uint32 seed;
};
- Common::Array<RandomSourceRecord> _randomSourceRecords;
+ Common::Array<RandomSourceRecord> _randomSourceRecords;
bool _recordSubtitles;
volatile uint32 _recordCount;
@@ -70,7 +70,7 @@ class DefaultEventManager : public Common::EventManager {
volatile uint32 _playbackDiff;
volatile bool _hasPlaybackEvent;
volatile uint32 _playbackTimeCount;
- Common::Event _playbackEvent;
+ Common::Event _playbackEvent;
Common::InSaveFile *_playbackFile;
Common::InSaveFile *_playbackTimeFile;
@@ -86,7 +86,7 @@ class DefaultEventManager : public Common::EventManager {
Common::String _recordFileName;
Common::String _recordTempFileName;
Common::String _recordTimeFileName;
-
+
// for continuous events (keyDown)
enum {
kKeyRepeatInitialDelay = 400,
diff --git a/backends/fs/abstract-fs-factory.cpp b/backends/fs/abstract-fs-factory.cpp
index 6126d82737..8cf936f5bc 100644
--- a/backends/fs/abstract-fs-factory.cpp
+++ b/backends/fs/abstract-fs-factory.cpp
@@ -27,7 +27,7 @@
/*
* All the following includes choose, at compile time, which specific backend will be used
* during the execution of the ScummVM.
- *
+ *
* It has to be done this way because not all the necessary libraries will be available in
* all build environments. Additionally, this results in smaller binaries.
*/
@@ -57,8 +57,8 @@
/**
* Creates concrete FilesystemFactory objects depending on the current architecture.
- *
- * @return AbstractFilesystemFactory* The specific factory for the current architecture.
+ *
+ * @return AbstractFilesystemFactory* The specific factory for the current architecture.
*/
AbstractFilesystemFactory *AbstractFilesystemFactory::makeFSFactory() {
#if defined(__amigaos4__)
diff --git a/backends/fs/abstract-fs.h b/backends/fs/abstract-fs.h
index 611948691e..f593023d24 100644
--- a/backends/fs/abstract-fs.h
+++ b/backends/fs/abstract-fs.h
@@ -46,7 +46,7 @@ protected:
friend class FilesystemNode;
typedef Common::String String;
typedef FilesystemNode::ListMode ListMode;
-
+
/**
* Returns the child node with the given name. If no child with this name
* exists, returns 0. When called on a non-directory node, it should
@@ -55,13 +55,13 @@ protected:
* Example:
* Calling getChild() for a node with path "/foo/bar" using name="file.txt",
* would produce a new node with "/foo/bar/file.txt" as path.
- *
+ *
* @note This function will append a separator char (\ or /) to the end of the
* path if needed.
- *
+ *
* @note Handling calls on non-dir nodes gracefully makes it possible to
* switch to a lazy type detection scheme in the future.
- *
+ *
* @param name String containing the name of the child to create a new node.
*/
virtual AbstractFilesystemNode *getChild(const String &name) const = 0;
@@ -77,7 +77,7 @@ public:
* Destructor.
*/
virtual ~AbstractFilesystemNode() {}
-
+
/*
* Indicates whether the object referred by this path exists in the filesystem or not.
*/
@@ -86,65 +86,65 @@ public:
/**
* Return a list of child nodes of this directory node. If called on a node
* that does not represent a directory, false is returned.
- *
+ *
* @param list List to put the contents of the directory in.
* @param mode Mode to use while listing the directory.
* @param hidden Whether to include hidden files or not in the results.
- *
+ *
* @return true if succesful, false otherwise (e.g. when the directory does not exist).
*/
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const = 0;
/**
* Returns a human readable path string.
- *
+ *
* @note By default, this method returns the value of getName().
*/
virtual String getDisplayName() const { return getName(); }
-
+
/**
* Returns the last component of the path pointed by this FilesystemNode.
- *
+ *
* Examples (POSIX):
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
- *
+ *
* @note This method is very architecture dependent, please check the concrete implementation for more information.
*/
virtual String getName() const = 0;
-
+
/**
* Returns the 'path' of the current node, usable in fopen().
*/
virtual String getPath() const = 0;
-
+
/**
* Indicates whether this path refers to a directory or not.
*/
virtual bool isDirectory() const = 0;
-
+
/**
* Indicates whether the object referred by this path can be read from or not.
- *
- * If the path refers to a directory, readability implies being able to read
+ *
+ * If the path refers to a directory, readability implies being able to read
* and list the directory entries.
- *
- * If the path refers to a file, readability implies being able to read the
+ *
+ * If the path refers to a file, readability implies being able to read the
* contents of the file.
- *
+ *
* @return bool true if the object can be read, false otherwise.
*/
virtual bool isReadable() const = 0;
-
+
/**
* Indicates whether the object referred by this path can be written to or not.
- *
+ *
* If the path refers to a directory, writability implies being able to modify
* the directory entry (i.e. rename the directory, remove it or write files inside of it).
- *
+ *
* If the path refers to a file, writability implies being able to write data
* to the file.
- *
+ *
* @return bool true if the object can be written to, false otherwise.
*/
virtual bool isWritable() const = 0;
diff --git a/backends/fs/amigaos4/amigaos4-fs-factory.h b/backends/fs/amigaos4/amigaos4-fs-factory.h
index 01a976bdd7..262b3ed233 100644
--- a/backends/fs/amigaos4/amigaos4-fs-factory.h
+++ b/backends/fs/amigaos4/amigaos4-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates AmigaOSFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class AmigaOSFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<AmigaOSFilesystemFactory> {
+class AmigaOSFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<AmigaOSFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
AmigaOSFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp
index d4bf58c7e3..16a95cc779 100644
--- a/backends/fs/amigaos4/amigaos4-fs.cpp
+++ b/backends/fs/amigaos4/amigaos4-fs.cpp
@@ -46,7 +46,7 @@ const uint32 kExAllBufferSize = 40960; // TODO: is this okay for sure?
/**
* Implementation of the ScummVM file system API.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class AmigaOSFilesystemNode : public AbstractFilesystemNode {
@@ -56,11 +56,11 @@ protected:
String _sPath;
bool _bIsDirectory;
bool _bIsValid;
-
+
/**
* Obtain the FileInfoBlock protection value for this FilesystemNode,
* as defined in the <proto/dos.h> header.
- *
+ *
* @return -1 if there were errors, 0 or a positive integer otherwise.
*/
virtual int getFibProtection() const;
@@ -70,14 +70,14 @@ public:
* Creates a AmigaOSFilesystemNode with the root node as path.
*/
AmigaOSFilesystemNode();
-
+
/**
* Creates a AmigaOSFilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
*/
AmigaOSFilesystemNode(const String &p);
-
+
/**
* FIXME: document this constructor.
*/
@@ -85,11 +85,11 @@ public:
/**
* Copy constructor.
- *
+ *
* @note Needed because it duplicates the file lock
*/
AmigaOSFilesystemNode(const AmigaOSFilesystemNode &node);
-
+
/**
* Destructor.
*/
@@ -102,11 +102,11 @@ public:
virtual bool isDirectory() const { return _bIsDirectory; };
virtual bool isReadable() const;
virtual bool isWritable() const;
-
+
virtual AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
-
+
/**
* Creates a list with all the volumes present in the root node.
*/
@@ -115,18 +115,18 @@ public:
/**
* Returns the last component of a given path.
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
int offset = str.size();
-
+
if (offset <= 0) {
debug(6, "Bad offset");
return 0;
}
-
+
const char *p = str.c_str();
while (offset > 0 && (p[offset-1] == '/' || p[offset-1] == ':'))
@@ -189,7 +189,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(const String &p) {
else {
//_bIsDirectory = false;
_bIsValid = true;
- }
+ }
}
IDOS->UnLock(pLock);
@@ -220,7 +220,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam
delete [] n;
return;
}
-
+
bufSize *= 2;
delete [] n;
}
@@ -248,7 +248,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam
else {
//_bIsDirectory = false;
_bIsValid = true;
- }
+ }
}
IDOS->FreeDosObject(DOS_FIB, fib);
@@ -277,23 +277,23 @@ bool AmigaOSFilesystemNode::exists() const {
ENTER();
if(_sPath.empty())
return false;
-
+
bool nodeExists = false;
-
+
struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
if (!fib) {
debug(6, "FileInfoBlock is NULL");
LEAVE();
return false;
}
-
+
BPTR pLock = IDOS->Lock((STRPTR)_sPath.c_str(), SHARED_LOCK);
if (pLock) {
if (IDOS->Examine(pLock, fib) != DOSFALSE)
nodeExists = true;
IDOS->UnLock(pLock);
}
-
+
IDOS->FreeDosObject(DOS_FIB, fib);
LEAVE();
return nodeExists;
@@ -402,13 +402,13 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
}
LEAVE();
-
+
return true;
}
int AmigaOSFilesystemNode::getFibProtection() const {
ENTER();
-
+
int fibProt = -1;
struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
if (!fib) {
@@ -416,7 +416,7 @@ int AmigaOSFilesystemNode::getFibProtection() const {
LEAVE();
return fibProt;
}
-
+
BPTR pLock = IDOS->Lock((STRPTR)_sPath.c_str(), SHARED_LOCK);
if (pLock) {
if (IDOS->Examine(pLock, fib) != DOSFALSE) {
@@ -424,7 +424,7 @@ int AmigaOSFilesystemNode::getFibProtection() const {
}
IDOS->UnLock(pLock);
}
-
+
IDOS->FreeDosObject(DOS_FIB, fib);
LEAVE();
return fibProt;
@@ -456,39 +456,39 @@ AbstractFilesystemNode *AmigaOSFilesystemNode::getParent() const {
node = new AmigaOSFilesystemNode();
LEAVE();
-
+
return node;
}
bool AmigaOSFilesystemNode::isReadable() const {
bool readable = false;
int fibProt = getFibProtection();
-
+
if (fibProt >= 0) {
/* The fib_Protection flag is low-active or inverted, thus the negation.
- *
+ *
* For more information, consult the compiler/include/dos/dos.h
* file from the AROS source (http://aros.sourceforge.net/).
*/
readable = !(fibProt & FIBF_READ);
}
-
+
return readable;
}
bool AmigaOSFilesystemNode::isWritable() const {
bool writable = false;
int fibProt = getFibProtection();
-
+
if (fibProt >= 0) {
/* The fib_Protection flag is low-active or inverted, thus the negation.
- *
+ *
* For more information, consult the compiler/include/dos/dos.h
* file from the AROS source (http://aros.sourceforge.net/).
*/
writable = !(fibProt & FIBF_WRITE);
}
-
+
return writable;
}
@@ -513,7 +513,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
dosList->dol_Name &&
dosList->dol_Task) {
//const char *volName = (const char *)BADDR(dosList->dol_Name)+1;
-
+
// Copy name to buffer
IDOS->CopyStringBSTRToC(dosList->dol_Name, buffer, MAXPATHLEN);
@@ -533,7 +533,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
// Find device name
IDOS->DevNameFromLock(volumeLock, devName, MAXPATHLEN, DN_DEVICEONLY);
-
+
sprintf(buffer, "%s (%s)", volName, devName);
delete [] devName;
@@ -562,7 +562,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const {
IDOS->UnLockDosList(kLockFlags);
LEAVE();
-
+
return myList;
}
diff --git a/backends/fs/dc/dc-fs.cpp b/backends/fs/dc/dc-fs.cpp
index 32170eef27..307f6f8852 100644
--- a/backends/fs/dc/dc-fs.cpp
+++ b/backends/fs/dc/dc-fs.cpp
@@ -32,7 +32,7 @@
/**
* Implementation of the ScummVM file system API based on Ronin.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class RoninCDFilesystemNode : public AbstractFilesystemNode {
@@ -47,10 +47,10 @@ public:
* Creates a RoninCDFilesystemNode with the root node as path.
*/
RoninCDFilesystemNode();
-
+
/**
* Creates a RoninCDFilesystemNode for a given path.
- *
+ *
* @param path 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.
*/
@@ -71,18 +71,18 @@ public:
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
-
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
@@ -129,7 +129,7 @@ AbstractFilesystemNode *RoninCDFilesystemNode::getChild(const String &n) const {
// FIXME: Pretty lame implementation! We do no error checking to speak
// of, do not check if this is a special node, etc.
assert(_isDirectory);
-
+
String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
@@ -140,9 +140,9 @@ AbstractFilesystemNode *RoninCDFilesystemNode::getChild(const String &n) const {
bool RoninCDFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
-
+
//TODO: honor the hidden flag
-
+
DIR *dirp = opendir(_path.c_str());
struct dirent *dp;
@@ -172,11 +172,11 @@ bool RoninCDFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
if (entry._isDirectory)
entry._path += "/";
-
+
myList.push_back(new RoninCDFilesystemNode(entry));
}
closedir(dirp);
-
+
return true;
}
diff --git a/backends/fs/dc/ronincd-fs-factory.h b/backends/fs/dc/ronincd-fs-factory.h
index d827cc51e3..e49c2c04fa 100644
--- a/backends/fs/dc/ronincd-fs-factory.h
+++ b/backends/fs/dc/ronincd-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates RoninCDFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class RoninCDFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<RoninCDFilesystemFactory> {
+class RoninCDFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<RoninCDFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
RoninCDFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/ds/ds-fs-factory.h b/backends/fs/ds/ds-fs-factory.h
index a6a7bf6532..292a2baa69 100644
--- a/backends/fs/ds/ds-fs-factory.h
+++ b/backends/fs/ds/ds-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates DSFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class DSFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<DSFilesystemFactory> {
+class DSFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<DSFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
DSFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp
index bd8cc59008..6a1279e1e1 100644
--- a/backends/fs/ds/ds-fs.cpp
+++ b/backends/fs/ds/ds-fs.cpp
@@ -8,7 +8,7 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@@ -49,7 +49,7 @@ DSFileSystemNode::DSFileSystemNode() {
_archive = (GBFS_FILE *) find_first_gbfs_file(scummdata);
if (!_archive) consolePrintf("No GBFS archive found!\n");
}*/
-
+
if (!_zipFile) {
_zipFile = new ZipFile();
}
@@ -57,19 +57,19 @@ DSFileSystemNode::DSFileSystemNode() {
DSFileSystemNode::DSFileSystemNode(const String& path) {
// consolePrintf("--%s ",path.c_str());
-
+
char disp[128];
char* pathStr = (char *) path.c_str();
-
+
int lastSlash = 3;
for (int r = 0; r < (int) strlen(pathStr) - 1; r++) {
if (path[r] == '\\') {
lastSlash = r;
}
}
-
+
strcpy(disp, pathStr + lastSlash + 1);
-
+
_displayName = String(disp);
_path = path;
// _isValid = true;
@@ -78,13 +78,13 @@ DSFileSystemNode::DSFileSystemNode(const String& path) {
if (!strncmp(pathStr, "ds:/", 4)) {
pathStr += 4;
}
-
+
if (*pathStr == '\0') {
_isValid = true;
_isDirectory = true;
return;
}
-
+
_zipFile->setAllFilesVisible(true);
if (_zipFile->findFile(pathStr)) {
_isValid = true;
@@ -94,13 +94,13 @@ DSFileSystemNode::DSFileSystemNode(const String& path) {
_isDirectory = false;
}
_zipFile->setAllFilesVisible(false);
-
+
// consolePrintf("%s - Found: %d, Dir: %d\n", pathStr, _isValid, _isDirectory);
}
DSFileSystemNode::DSFileSystemNode(const String& path, bool isDir) {
// consolePrintf("--%s ",path.c_str());
-
+
char disp[128];
char* pathStr = (char *) path.c_str();
int lastSlash = 3;
@@ -109,14 +109,14 @@ DSFileSystemNode::DSFileSystemNode(const String& path, bool isDir) {
lastSlash = r;
}
}
-
+
strcpy(disp, pathStr + lastSlash + 1);
-
+
_displayName = String(disp);
_path = path;
_isValid = true;
_isDirectory = isDir;
-
+
// consolePrintf("Found: %d, Dir: %d\n", _isValid, _isDirectory);
}
@@ -130,7 +130,7 @@ AbstractFilesystemNode *DSFileSystemNode::getChild(const Common::String& n) cons
} else {
return new DSFileSystemNode(_path + "\\" + n);
}
-
+
return NULL;
}
@@ -150,7 +150,7 @@ bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode, bool
_zipFile->changeDirectory(&temp[4]);
} else {
_zipFile->changeToRoot();
-
+
/* // This is the root dir, so add the RAM folder
DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/ram");
dsfsn->_isDirectory = true;
@@ -160,21 +160,21 @@ bool DSFileSystemNode::getChildren(AbstractFSList &dirList, ListMode mode, bool
} else {
_zipFile->changeDirectory(temp);
}
-
+
if (_zipFile->restartFile()) {
do {
- char n[128];
+ char n[128];
_zipFile->getFileName(n);
-
+
// consolePrintf("file: %s\n", n);
- if ( (_zipFile->isDirectory() && ((mode == FilesystemNode::kListDirectoriesOnly) || (mode == FilesystemNode::kListAll)) )
- || (!_zipFile->isDirectory() && ((mode == FilesystemNode::kListFilesOnly) || (mode == FilesystemNode::kListAll)) ) )
+ if ( (_zipFile->isDirectory() && ((mode == FilesystemNode::kListDirectoriesOnly) || (mode == FilesystemNode::kListAll)) )
+ || (!_zipFile->isDirectory() && ((mode == FilesystemNode::kListFilesOnly) || (mode == FilesystemNode::kListAll)) ) )
{
DSFileSystemNode* dsfsn = new DSFileSystemNode("ds:/" + String(n), _zipFile->isDirectory());
dsfsn->_isDirectory = _zipFile->isDirectory();
dirList.push_back((dsfsn));
}
-
+
} while (_zipFile->skipFile());
}
@@ -185,10 +185,10 @@ AbstractFilesystemNode* DSFileSystemNode::getParent() const {
// consolePrintf("parent\n");
DSFileSystemNode *p;
- if (_path != "ds:/") {
+ if (_path != "ds:/") {
char *path = (char *) _path.c_str();
int lastSlash = 4;
-
+
for (int r = 4; r < (int) strlen((char *) path); r++) {
if (path[r] == '\\') {
lastSlash = r;
@@ -218,7 +218,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode() {
GBAMPFileSystemNode::GBAMPFileSystemNode(const String& path) {
// consolePrintf("'%s'",path.c_str());
-
+
char disp[128];
char* pathStr = (char *) path.c_str();
int lastSlash = 3;
@@ -227,12 +227,12 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const String& path) {
lastSlash = r;
}
}
-
+
strcpy(disp, pathStr + lastSlash + 1);
char check[128];
int success;
-
+
memset(check, 0, 128);
if (strlen(pathStr) > 3) {
strcpy(check, pathStr + 3);
@@ -244,7 +244,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const String& path) {
success = FT_DIR;
}
// consolePrintf("Path: %s (%d)\n", check, success);
-
+
_displayName = String(disp);
_path = path;
_isValid = success == FT_FILE;
@@ -253,7 +253,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const String& path) {
GBAMPFileSystemNode::GBAMPFileSystemNode(const String& path, bool isDirectory) {
// consolePrintf("'%s'",path.c_str());
-
+
char disp[128];
char* pathStr = (char *) path.c_str();
int lastSlash = 3;
@@ -262,7 +262,7 @@ GBAMPFileSystemNode::GBAMPFileSystemNode(const String& path, bool isDirectory) {
lastSlash = r;
}
}
-
+
strcpy(disp, pathStr + lastSlash + 1);
_displayName = String(disp);
@@ -282,7 +282,7 @@ AbstractFilesystemNode *GBAMPFileSystemNode::getChild(const Common::String& n) c
} else {
return new DSFileSystemNode(_path + "\\" + n);
}
-
+
return NULL;
}
@@ -292,12 +292,12 @@ bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode, bo
//TODO: honor the hidden flag
enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 };
-
+
char temp[128], fname[256], *path, *pathTemp;
strcpy(temp, _path.c_str());
-
+
path = temp + 3;
-
+
pathTemp = path;
while (*pathTemp) {
if (*pathTemp == '\\') {
@@ -308,37 +308,37 @@ bool GBAMPFileSystemNode::getChildren(AbstractFSList& dirList, ListMode mode, bo
consolePrintf("This dir: %s\n", path);
FAT_chdir(path);
-
+
int entryType = FAT_FindFirstFileLFN(fname);
-
+
while (entryType != TYPE_NO_MORE) {
-
+
if ( ((entryType == TYPE_DIR) && ((mode == FilesystemNode::kListDirectoriesOnly) || (mode == FilesystemNode::kListAll)))
|| ((entryType == TYPE_FILE) && ((mode == FilesystemNode::kListFilesOnly) || (mode == FilesystemNode::kListAll))) ) {
GBAMPFileSystemNode* dsfsn;
consolePrintf("Fname: %s\n", fname);
-
+
if (strcmp(fname, ".") && strcmp(fname, "..")) {
-
+
if (!strcmp(path, "/")) {
dsfsn = new GBAMPFileSystemNode("mp:" + String(path) + String(fname), entryType == TYPE_DIR);
} else {
dsfsn = new GBAMPFileSystemNode("mp:" + String(path) + String("/") + String(fname), entryType == TYPE_DIR);
}
-
+
// dsfsn->_isDirectory = entryType == DIR;
dirList.push_back((dsfsn));
}
} else {
// consolePrintf("Skipping %s\n", fname);
}
-
+
entryType = FAT_FindNextFileLFN(fname);
}
-
+
// consolePrintf("No more");
-
+
FAT_chdir("/");
return true;
@@ -348,10 +348,10 @@ AbstractFilesystemNode* GBAMPFileSystemNode::getParent() const {
// consolePrintf("parent\n");
GBAMPFileSystemNode *p;
- if (_path != "mp:/") {
+ if (_path != "mp:/") {
char *path = (char *) _path.c_str();
int lastSlash = 4;
-
+
for (int r = 4; r < (int) strlen((char *) path); r++) {
if (path[r] == '/') {
lastSlash = r;
@@ -381,14 +381,14 @@ FILE* std_fopen(const char* name, const char* mode) {
inited = true;
currentDir[0] = '\0';
}
-
+
char* realName = (char *) name;
-
+
// Remove file system prefix
if ((name[0] == 'd') && (name[1] == 's') && (name[2] == ':') && (name[3] == '/')) {
realName += 4;
}
-
+
if ((name[0] == 'm') && (name[1] == 'p') && (name[2] == ':') && (name[3] == '/')) {
realName += 4;
}
@@ -398,15 +398,15 @@ FILE* std_fopen(const char* name, const char* mode) {
if (DS::isGBAMPAvailable()) {
FAT_chdir("/");
-
+
char* p = realName;
while (*p) {
if (*p == '\\') *p = '/';
p++;
}
-
+
FAT_FILE* result = FAT_fopen(realName, mode);
-
+
if (result == 0) {
// consolePrintf("Error code %d\n", result);
//consolePrintf("Opening file %s\n", realName);
@@ -414,16 +414,16 @@ FILE* std_fopen(const char* name, const char* mode) {
// consolePrintf("Opened file %d\n", result);
}
// MT_memoryReport();
-
+
return (FILE *) result;
}
-
+
// Fail to open file for writing. It's in ROM!
-
+
// Allocate a file handle
int r = 0;
while (handle[r].used) r++;
-
+
if (strchr(mode, 'w')) {
// consolePrintf("Writing %s\n", realName);
handle[r].sramFile = (DSSaveFile *) DSSaveFileManager::instance()->openSavefile(realName, true);
@@ -439,22 +439,22 @@ FILE* std_fopen(const char* name, const char* mode) {
handle[r].size = handle[r].sramFile->getSize();
// consolePrintf("Found it");
return &handle[r];
- }
+ }
// consolePrintf("Not in SRAM!");
char* data;
-
+
ZipFile* zip = DSFileSystemNode::getZip();
if (!zip) {
// consolePrintf("No zip yet!");
return NULL;
}
-
+
// Grab the data if it exists
-
+
zip->setAllFilesVisible(true);
-
+
if (currentDir[0] != 0) {
char nameWithPath[128];
sprintf(nameWithPath, "%s\%s", currentDir, realName);
@@ -462,16 +462,16 @@ FILE* std_fopen(const char* name, const char* mode) {
}
// consolePrintf("fopen(%s, %s)\n", realName, name);
-
+
if (zip->findFile(realName)) {
data = zip->getFile();
zip->setAllFilesVisible(false);
-
+
// Allocate a file handle
int r = 0;
while (handle[r].used) r++;
-
-
+
+
handle[r].used = true;
handle[r].pos = 0;
handle[r].data = data;
@@ -512,26 +512,26 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
return bytes / size;
}
return numItems;
-
+
/* int item = 0;
u8* data = (u8 *) ptr;
while ((item < numItems) && (!FAT_feof((FAT_FILE *) handle))) {
-
+
int bytes = 0;
while ((bytes < size) && (!FAT_feof((FAT_FILE *) handle))) {
*data++ = FAT_fgetc((FAT_FILE *) handle);
bytes++;
}
-
+
item++;
-
+
}
-
+
return item;
*/
int items = 0;
-
+
//for (int r = 0; r < numItems; r++) {
if (!std_feof(handle)) {
/* for (int t = 0; t < size; t++) {
@@ -540,7 +540,7 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
}*/
int left = size * numItems;
int bytesRead = -1;
-
+
while ((left > 0) && (!FAT_feof((FAT_FILE *) handle))) {
int amount = left > 8192? 8192: left;
// do {
@@ -548,9 +548,9 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
/* if (bytesRead == 0) {
consolePrintf("Pos:%d items:%d num:%d amount:%d read:%d\n", ftell(handle), items, numItems, amount, bytesRead);
left++;
-
+
int pos = ftell(handle);
-
+
fseek(handle, 0, SEEK_SET);
int c = getc(handle);
fseek(handle, pos - 1024, SEEK_SET);
@@ -562,21 +562,21 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
} while (bytesRead == 0);
*/
left -= bytesRead;
- ptr = ((char *) (ptr)) + bytesRead;
+ ptr = ((char *) (ptr)) + bytesRead;
}
-
+
items = numItems - (left / size);
// FAT_fread((void *) ptr, size, 1, ((int) (handle)) - 1);
-// ptr = ((char *) (ptr)) + size;
+// ptr = ((char *) (ptr)) + size;
}
// }
-
+
// consolePrintf("...done %d \n", items)
return items;
}
-
+
if (handle->sramFile) {
int bytes = 0;
int result = 1;
@@ -586,9 +586,9 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
bytes += result;
//consolePrintf("'%d',", ((char *) (ptr))[0]);
}
-
+
handle->pos += bytes;
-
+
return bytes / size;
}
@@ -607,7 +607,7 @@ size_t std_fread(const void* ptr, size_t size, size_t numItems, FILE* handle) {
size_t std_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle) {
if ((handle == stdin)) return 0;
-
+
if ((handle == stderr) || (handle == stdout)) {
// consolePrintf((char *) ptr);
return size;
@@ -618,18 +618,18 @@ size_t std_fwrite(const void* ptr, size_t size, size_t numItems, FILE* handle) {
if (DS::isGBAMPAvailable()) {
FAT_fwrite(((char *) (ptr)), size, numItems, (FAT_FILE *) handle);
return numItems;
-
+
int length = size * numItems;
int pos = 0;
-
+
while (pos < length) {
int amount = length > 512? 512: length;
-
+
FAT_fwrite(((char *) (ptr)) + pos, 1, amount, (FAT_FILE *) handle);
length -= amount;
- pos += amount;
- }
-
+ pos += amount;
+ }
+
return numItems;
}
@@ -651,7 +651,7 @@ bool std_feof(FILE* handle) {
if (DS::isGBAMPAvailable()) {
return FAT_feof((FAT_FILE *) handle);
}
-
+
if (handle->sramFile) {
return handle->sramFile->eos();
}
@@ -667,19 +667,19 @@ void std_fflush(FILE* handle) {
char* std_fgets(char* str, int size, FILE* file) {
// consolePrintf("fgets file=%d ", file);
-
+
if (DS::isGBAMPAvailable()) {
char* s = str;
while ((*s++ = std_getc(file)) >= 32) {
// consolePrintf("%d ", *s);
}
*s = 0;
-
+
// consolePrintf("Read:%s\n", str);
-
+
return str;
}
-
+
if (file->sramFile) {
file->pos--;
int p = -1;
@@ -694,7 +694,7 @@ char* std_fgets(char* str, int size, FILE* file) {
// consolePrintf("Read:%s\n", str);
return str;
}
-
+
return NULL;
}
@@ -727,7 +727,7 @@ int std_fseek(FILE* handle, long int offset, int whence) {
handle->pos = offset;
break;
}
-
+
return 0;
}
@@ -740,7 +740,7 @@ int std_getc(FILE* handle) {
if (DS::isGBAMPAvailable()) {
char c;
FAT_fread(&c, 1, 1, (FAT_FILE *) handle);
-
+
return c;
}
@@ -763,15 +763,15 @@ void std_cwd(char* dir) {
if ((strlen(dir) >= 4) && (dir[0] == 'm') && (dir[1] == 'p') && (dir[2] == ':') && (dir[3] == '/')) {
realName += 4;
}
-
+
// consolePrintf("Real cwd:%d\n", realName);
-
+
char* p = realName;
while (*p) {
if (*p == '\\') *p = '/';
p++;
}
-
+
// consolePrintf("Real cwd:%d\n", realName);
FAT_chdir(realName);
} else {
@@ -784,13 +784,13 @@ void std_cwd(char* dir) {
if (*p == '\\') *p = '/';
p++;
}
-
+
strcpy(currentDir, realName);
if (*(currentDir + strlen(currentDir) - 1) == '/') {
*(currentDir + strlen(currentDir) - 1) = '\0';
}
// consolePrintf("CWD: %s\n", currentDir);
- }
+ }
}
int std_ferror(FILE* handle) {
@@ -801,11 +801,11 @@ int std_ferror(FILE* handle) {
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h
index 0b5037d1a7..6b3452b53b 100644
--- a/backends/fs/ds/ds-fs.h
+++ b/backends/fs/ds/ds-fs.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _DS_FS_H
#define _DS_FS_H
@@ -36,7 +36,7 @@ namespace DS {
/**
* Implementation of the ScummVM file system API.
* This class is used when a Flash cart is in use.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class DSFileSystemNode : public AbstractFilesystemNode {
@@ -50,33 +50,33 @@ protected:
bool _isDirectory;
bool _isValid;
int _refCountVal;
-
+
public:
/**
* Creates a DSFilesystemNode with the root node as path.
*/
DSFileSystemNode();
-
+
/**
* Creates a DSFilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
*/
DSFileSystemNode(const String &path);
-
+
/**
* Creates a DSFilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
* @param path true if path is a directory, false otherwise.
*/
DSFileSystemNode(const String& path, bool isDir);
-
+
/**
* Copy constructor.
*/
DSFileSystemNode(const DSFileSystemNode *node);
-
+
virtual bool exists() const { return true; } //FIXME: this is just a stub
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
@@ -84,7 +84,7 @@ public:
virtual bool isDirectory() const { return _isDirectory; }
virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
-
+
/**
* Returns a copy of this node.
*/
@@ -92,7 +92,7 @@ public:
virtual AbstractFilesystemNode *getChild(const Common::String& name) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode = FilesystemNode::kListDirectoriesOnly, bool hidden = false) const;
virtual AbstractFilesystemNode *getParent() const;
-
+
/**
* Returns the zip file this node points to.
* TODO: check this documentation.
@@ -103,7 +103,7 @@ public:
/**
* Implementation of the ScummVM file system API.
* This class is used when the GBAMP (GBA Movie Player) is used with a CompactFlash card.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class GBAMPFileSystemNode : public AbstractFilesystemNode {
@@ -115,41 +115,41 @@ protected:
bool _isDirectory;
bool _isValid;
int _refCountVal;
-
+
public:
/**
* Creates a GBAMPFilesystemNode with the root node as path.
*/
GBAMPFileSystemNode();
-
+
/**
* Creates a GBAMPFilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
*/
GBAMPFileSystemNode(const String &path);
-
+
/**
* Creates a DSFilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
* @param path true if path is a directory, false otherwise.
*/
GBAMPFileSystemNode(const String &path, bool isDirectory);
-
+
/**
* Copy constructor.
*/
GBAMPFileSystemNode(const GBAMPFileSystemNode *node);
- virtual bool exists() const { return _isValid || _isDirectory; }
+ virtual bool exists() const { return _isValid || _isDirectory; }
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
virtual String getPath() const { return _path; }
virtual bool isDirectory() const { return _isDirectory; }
virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
-
+
/**
* Returns a copy of this node.
*/
@@ -164,7 +164,7 @@ struct fileHandle {
bool used;
char* data;
int size;
-
+
DSSaveFile* sramFile;
};
@@ -177,7 +177,7 @@ struct fileHandle {
#define stdin ((DS::fileHandle*) -3)
#define FILE DS::fileHandle
-
+
// Please do not remove any of these prototypes that appear not to be required.
FILE* std_fopen(const char* name, const char* mode);
void std_fclose(FILE* handle);
diff --git a/backends/fs/gp32/gp32-fs-factory.h b/backends/fs/gp32/gp32-fs-factory.h
index 0810695152..90c6bd9500 100644
--- a/backends/fs/gp32/gp32-fs-factory.h
+++ b/backends/fs/gp32/gp32-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates GP32FilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class GP32FilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<GP32FilesystemFactory> {
+class GP32FilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<GP32FilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
GP32FilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/gp32/gp32-fs.cpp b/backends/fs/gp32/gp32-fs.cpp
index 1df07a0d37..56705b90fc 100644
--- a/backends/fs/gp32/gp32-fs.cpp
+++ b/backends/fs/gp32/gp32-fs.cpp
@@ -29,7 +29,7 @@
/**
* Implementation of the ScummVM file system API.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class GP32FilesystemNode : public AbstractFilesystemNode {
@@ -44,10 +44,10 @@ public:
* Creates a GP32FilesystemNode with the root node as path.
*/
GP32FilesystemNode();
-
+
/**
* Creates a GP32FilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
*/
GP32FilesystemNode(const String &path);
@@ -72,18 +72,18 @@ const char gpRootPath[] = "gp:\\";
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* gp:\foo\bar.txt would return "\bar.txt"
* gp:\foo\bar\ would return "\bar\"
- *
+ *
* @param str Path to obtain the last component from.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
-
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
@@ -96,7 +96,7 @@ const char *lastPathComponent(const Common::String &str) {
/**
* FIXME: document this function.
- *
+ *
* @param path
* @param convPath
*/
@@ -165,7 +165,7 @@ GP32FilesystemNode::GP32FilesystemNode(const String &path) {
_path = convPath;
pos = convPath;
-
+
while (*pos)
if (*pos++ == '\\')
dsplName = pos;
@@ -186,7 +186,7 @@ AbstractFilesystemNode *GP32FilesystemNode::getChild(const String &n) const {
// FIXME: Pretty lame implementation! We do no error checking to speak
// of, do not check if this is a special node, etc.
assert(_isDirectory);
-
+
String newPath(_path);
if (_path.lastChar() != '\\')
newPath += '\\';
@@ -213,11 +213,11 @@ bool GP32FilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
int startIdx = 0; // current file
String listDir(_path);
//listDir += "/";
-
+
while (GpDirEnumList(listDir.c_str(), startIdx++, 1, &dirEntry, &read) == SM_OK) {
da if (dirEntry.name[0] == '.')
continue;
-
+
entry._displayName = dirEntry.name;
entry._path = _path;
entry._path += dirEntry.name;
diff --git a/backends/fs/morphos/abox-fs-factory.h b/backends/fs/morphos/abox-fs-factory.h
index 19ef2b097f..1adbd1475a 100644
--- a/backends/fs/morphos/abox-fs-factory.h
+++ b/backends/fs/morphos/abox-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates ABoxFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class ABoxFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<ABoxFilesystemFactory> {
+class ABoxFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<ABoxFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
ABoxFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/morphos/abox-fs.cpp b/backends/fs/morphos/abox-fs.cpp
index 7b8bb4e451..bccd77a40f 100644
--- a/backends/fs/morphos/abox-fs.cpp
+++ b/backends/fs/morphos/abox-fs.cpp
@@ -35,7 +35,7 @@
/**
* Implementation of the ScummVM file system API based on the MorphOS A-Box API.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class ABoxFilesystemNode : public AbstractFilesystemNode {
@@ -51,19 +51,19 @@ public:
* Creates a ABoxFilesystemNode with the root node as path.
*/
ABoxFilesystemNode();
-
+
/**
* Creates a ABoxFilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
*/
ABoxFilesystemNode(const String &p);
-
+
/**
* FIXME: document this constructor.
*/
ABoxFilesystemNode(BPTR lock, CONST_STRPTR display_name = NULL);
-
+
/**
* Copy constructor.
*/
@@ -81,11 +81,11 @@ public:
virtual bool isDirectory() const { return _isDirectory; }
virtual bool isReadable() const { return true; } //FIXME: this is just a stub
virtual bool isWritable() const { return true; } //FIXME: this is just a stub
-
+
virtual AbstractFilesystemNode *getChild(const String &name) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
-
+
/**
* Return the list of child nodes for the root node.
*/
@@ -94,14 +94,14 @@ public:
/**
* Returns the last component of a given path.
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if (str.empty())
return "";
-
+
const char *str = _path.c_str();
while (offset > 0 && (str[offset-1] == '/' || str[offset-1] == ':') )
offset--;
@@ -109,7 +109,7 @@ const char *lastPathComponent(const Common::String &str) {
len++;
offset--;
}
-
+
return str + offset;
}
@@ -162,7 +162,7 @@ ABoxFilesystemNode::ABoxFilesystemNode(const String &p) {
_isValid = true;
}
}
-
+
UnLock(pLock);
}
@@ -217,7 +217,7 @@ ABoxFilesystemNode::ABoxFilesystemNode(BPTR lock, CONST_STRPTR display_name)
_isValid = true;
}
}
-
+
FreeDosObject(DOS_FIB, fib);
}
@@ -262,7 +262,7 @@ AbstractFilesystemNode *ABoxFilesystemNode::getChild(const String &name) const {
bool ABoxFilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hidden) const
{
//TODO: honor the hidden flag
-
+
if (!_isValid)
{
debug(6, "listDir() called on invalid node");
diff --git a/backends/fs/palmos/palmos-fs-factory.h b/backends/fs/palmos/palmos-fs-factory.h
index 575ad8fbfc..9d873eeb12 100644
--- a/backends/fs/palmos/palmos-fs-factory.h
+++ b/backends/fs/palmos/palmos-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates PalmOSFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class PalmOSFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<PalmOSFilesystemFactory> {
+class PalmOSFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<PalmOSFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
PalmOSFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/palmos/palmos-fs.cpp b/backends/fs/palmos/palmos-fs.cpp
index 5ad3302d79..335aa7e8dd 100644
--- a/backends/fs/palmos/palmos-fs.cpp
+++ b/backends/fs/palmos/palmos-fs.cpp
@@ -31,7 +31,7 @@
/**
* Implementation of the ScummVM file system API based on PalmOS VFS API.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class PalmOSFilesystemNode : public AbstractFilesystemNode {
@@ -41,16 +41,16 @@ protected:
bool _isDirectory;
bool _isValid;
bool _isPseudoRoot;
-
+
public:
/**
* Creates a PalmOSFilesystemNode with the root node as path.
*/
PalmOSFilesystemNode();
-
+
/**
* Creates a POSIXFilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
*/
PalmOSFilesystemNode(const String &p);
@@ -70,8 +70,8 @@ public:
private:
/**
* Adds a single WindowsFilesystemNode to a given list.
- * This method is used by getChildren() to populate the directory entries 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 String with the directory being listed.
@@ -82,18 +82,18 @@ private:
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
-
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
@@ -122,7 +122,7 @@ void PalmOSFilesystemNode::addFile(AbstractFSList &list, ListMode mode, const ch
if (entry._isDirectory)
entry._path += "/";
- entry._isValid = true;
+ entry._isValid = true;
entry._isPseudoRoot = false;
list.push_back(new PalmOSFilesystemNode(entry));
@@ -161,7 +161,7 @@ PalmOSFilesystemNode::PalmOSFilesystemNode(const String &p) {
AbstractFilesystemNode *PalmOSFilesystemNode::getChild(const String &n) const {
assert(_isDirectory);
-
+
String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
@@ -172,7 +172,7 @@ AbstractFilesystemNode *PalmOSFilesystemNode::getChild(const String &n) const {
Err error = VFSFileOpen(gVars->VFS.volRefNum, newPath.c_str(), vfsModeRead, &handle);
if (error)
return 0;
-
+
error = VFSFileGetAttributes(handle, &attr);
VFSFileClose(handle);
@@ -184,7 +184,7 @@ AbstractFilesystemNode *PalmOSFilesystemNode::getChild(const String &n) const {
bool PalmOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
//TODO: honor the hidden flag
-
+
Err error;
Char nameP[256];
FileInfoType desc;
@@ -197,7 +197,7 @@ bool PalmOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bo
if (error)
return false;
-
+
while (dirIterator != expIteratorStop) {
error = VFSDirEntryEnumerate(handle, &dirIterator, &desc);
if (!error) {
@@ -212,11 +212,11 @@ bool PalmOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bo
AbstractFilesystemNode *PalmOSFilesystemNode::getParent() const {
PalmOSFilesystemNode *p = 0;
-
+
if (!_isPseudoRoot) {
const char *start = _path.c_str();
const char *end = lastPathComponent(_path);
-
+
p = new PalmOSFilesystemNode();
p->_path = String(start, end - start);
p->_isValid = true;
@@ -224,7 +224,7 @@ AbstractFilesystemNode *PalmOSFilesystemNode::getParent() const {
p->_displayName = lastPathComponent(p->_path);
p->_isPseudoRoot =(p->_path == "/");
}
-
+
return p;
}
diff --git a/backends/fs/posix/posix-fs-factory.h b/backends/fs/posix/posix-fs-factory.h
index a714175548..cf1204c0a3 100644
--- a/backends/fs/posix/posix-fs-factory.h
+++ b/backends/fs/posix/posix-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates POSIXFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
class POSIXFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<POSIXFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
POSIXFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 15acdbbf06..8ed6d9be6a 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -37,7 +37,7 @@
/**
* Implementation of the ScummVM file system API based on POSIX.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class POSIXFilesystemNode : public AbstractFilesystemNode {
@@ -52,15 +52,15 @@ public:
* Creates a POSIXFilesystemNode with the root node as path.
*/
POSIXFilesystemNode();
-
+
/**
* Creates a POSIXFilesystemNode for a given path.
- *
+ *
* @param path 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.
*/
POSIXFilesystemNode(const String &path, bool verify);
-
+
virtual bool exists() const { return access(_path.c_str(), F_OK) == 0; }
virtual String getDisplayName() const { return _displayName; }
virtual String getName() const { return _displayName; }
@@ -68,11 +68,11 @@ public:
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 AbstractFilesystemNode *getChild(const String &n) const;
virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const;
virtual AbstractFilesystemNode *getParent() const;
-
+
private:
/**
* Tests and sets the _isValid and _isDirectory flags, using the stat() function.
@@ -82,18 +82,18 @@ private:
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
-
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
@@ -106,7 +106,7 @@ const char *lastPathComponent(const Common::String &str) {
void POSIXFilesystemNode::setFlags() {
struct stat st;
-
+
_isValid = (0 == stat(_path.c_str(), &st));
_isDirectory = _isValid ? S_ISDIR(st.st_mode) : false;
}
@@ -146,18 +146,18 @@ AbstractFilesystemNode *POSIXFilesystemNode::getChild(const String &n) const {
// FIXME: Pretty lame implementation! We do no error checking to speak
// of, do not check if this is a special node, etc.
assert(_isDirectory);
-
+
String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
newPath += n;
-
+
return new POSIXFilesystemNode(newPath, true);
}
bool POSIXFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const {
assert(_isDirectory);
-
+
DIR *dirp = opendir(_path.c_str());
struct dirent *dp;
@@ -186,7 +186,7 @@ bool POSIXFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, boo
/* TODO: d_type is not part of POSIX, so it might not be supported
* on some of our targets. For those systems where it isn't supported,
* add this #elif case, which tries to use stat() instead.
- *
+ *
* The d_type method is used to avoid costly recurrent stat() calls in big
* directories.
*/
@@ -221,11 +221,11 @@ bool POSIXFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, boo
if (entry._isDirectory)
entry._path += "/";
-
+
myList.push_back(new POSIXFilesystemNode(entry));
}
closedir(dirp);
-
+
return true;
}
diff --git a/backends/fs/ps2/ps2-fs-factory.h b/backends/fs/ps2/ps2-fs-factory.h
index 9798b2b497..a7a52fdca3 100644
--- a/backends/fs/ps2/ps2-fs-factory.h
+++ b/backends/fs/ps2/ps2-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates PS2FilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class Ps2FilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<Ps2FilesystemFactory> {
+class Ps2FilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<Ps2FilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const 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 f371af6e57..b972887f94 100644
--- a/backends/fs/ps2/ps2-fs.cpp
+++ b/backends/fs/ps2/ps2-fs.cpp
@@ -34,7 +34,7 @@ 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, AbstractFilesystemNode.
*/
class Ps2FilesystemNode : public AbstractFilesystemNode {
@@ -49,14 +49,14 @@ public:
* Creates a PS2FilesystemNode with the root node as path.
*/
Ps2FilesystemNode();
-
+
/**
* Creates a PS2FilesystemNode for a given path.
- *
+ *
* @param path String with the path the new node should point to.
*/
Ps2FilesystemNode(const String &path);
-
+
/**
* Copy constructor.
*/
@@ -78,7 +78,7 @@ public:
/**
* Returns the last component of a given path.
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
@@ -138,10 +138,10 @@ AbstractFilesystemNode *Ps2FilesystemNode::getChild(const String &n) const {
char listDir[256];
sprintf(listDir, "%s/", _path.c_str());
int fd = fio.dopen(listDir);
-
+
if (fd >= 0) {
iox_dirent_t dirent;
-
+
while (fio.dread(fd, &dirent) > 0) {
if (strcmp(n.c_str(), dirent.name) == 0) {
Ps2FilesystemNode *dirEntry = new Ps2FilesystemNode();
@@ -161,13 +161,13 @@ AbstractFilesystemNode *Ps2FilesystemNode::getChild(const String &n) const {
}
fio.dclose(fd);
}
-
+
return NULL;
}
bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hidden) const {
//TODO: honor the hidden flag
-
+
if (!_isDirectory)
return false;
@@ -194,14 +194,14 @@ bool Ps2FilesystemNode::getChildren(AbstractFSList &list, ListMode mode, bool hi
} else {
char listDir[256];
int fd;
-
+
if (_path.lastChar() == '/')
fd = fio.dopen(_path.c_str());
else {
sprintf(listDir, "%s/", _path.c_str());
fd = fio.dopen(listDir);
}
-
+
if (fd >= 0) {
iox_dirent_t dirent;
Ps2FilesystemNode dirEntry;
diff --git a/backends/fs/psp/psp-fs-factory.h b/backends/fs/psp/psp-fs-factory.h
index 83a59dcc6a..143b2ce684 100644
--- a/backends/fs/psp/psp-fs-factory.h
+++ b/backends/fs/psp/psp-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates PSPFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class PSPFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<PSPFilesystemFactory> {
+class PSPFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<PSPFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
PSPFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 2f7ec803fe..7e850e3a52 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -34,7 +34,7 @@
/**
* Implementation of the ScummVM file system API based on PSPSDK API.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class PSPFilesystemNode : public AbstractFilesystemNode {
@@ -43,16 +43,16 @@ protected:
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 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.
*/
@@ -73,18 +73,18 @@ public:
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* /foo/bar.txt would return /bar.txt
* /foo/bar/ would return /bar/
- *
+ *
* @param str String containing the path.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
-
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
@@ -104,24 +104,24 @@ PSPFilesystemNode::PSPFilesystemNode() {
PSPFilesystemNode::PSPFilesystemNode(const Common::String &p, bool verify) {
assert(p.size() > 0);
-
+
_path = p;
_displayName = lastPathComponent(_path);
_isValid = true;
_isDirectory = true;
if (verify) {
- struct stat st;
+ struct stat st;
_isValid = (0 == stat(_path.c_str(), &st));
_isDirectory = S_ISDIR(st.st_mode);
- }
+ }
}
AbstractFilesystemNode *PSPFilesystemNode::getChild(const String &n) const {
// FIXME: Pretty lame implementation! We do no error checking to speak
// of, do not check if this is a special node, etc.
assert(_isDirectory);
-
+
String newPath(_path);
if (_path.lastChar() != '/')
newPath += '/';
@@ -137,30 +137,30 @@ bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
int dfd = sceIoDopen(_path.c_str());
if (dfd > 0) {
- SceIoDirent dir;
+ SceIoDirent dir;
memset(&dir, 0, sizeof(dir));
-
+
while (sceIoDread(dfd, &dir) > 0) {
// Skip 'invisible files
- if (dir.d_name[0] == '.')
+ if (dir.d_name[0] == '.')
continue;
-
+
PSPFilesystemNode entry;
-
+
entry._isValid = true;
entry._displayName = dir.d_name;
entry._path = _path;
entry._path += dir.d_name;
entry._isDirectory = dir.d_stat.st_attr & FIO_SO_IFDIR;
-
+
if (entry._isDirectory)
entry._path += "/";
-
+
// Honor the chosen mode
if ((mode == FilesystemNode::kListFilesOnly && entry._isDirectory) ||
(mode == FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
-
+
myList.push_back(new PSPFilesystemNode(entry));
}
@@ -174,10 +174,10 @@ bool PSPFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool
AbstractFilesystemNode *PSPFilesystemNode::getParent() const {
if (_path == ROOT_PATH)
return 0;
-
+
const char *start = _path.c_str();
const char *end = lastPathComponent(_path);
-
+
return new PSPFilesystemNode(String(start, end - start), false);
}
diff --git a/backends/fs/symbian/symbian-fs-factory.h b/backends/fs/symbian/symbian-fs-factory.h
index b30ca89f99..4b663fd6b9 100644
--- a/backends/fs/symbian/symbian-fs-factory.h
+++ b/backends/fs/symbian/symbian-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates SymbianFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class SymbianFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<SymbianFilesystemFactory> {
+class SymbianFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<SymbianFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
SymbianFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/symbian/symbian-fs.cpp b/backends/fs/symbian/symbian-fs.cpp
index 90d7bb48d4..d4c4513d90 100644
--- a/backends/fs/symbian/symbian-fs.cpp
+++ b/backends/fs/symbian/symbian-fs.cpp
@@ -22,7 +22,7 @@
* $Id$
*/
-#if defined (__SYMBIAN32__)
+#if defined (__SYMBIAN32__)
#include "backends/fs/abstract-fs.h"
#include <dirent.h>
@@ -32,7 +32,7 @@
/**
* Implementation of the ScummVM file system API based on POSIX.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemNode.
*/
class SymbianFilesystemNode : public AbstractFilesystemNode {
@@ -46,19 +46,19 @@ protected:
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 String with the path the new node should point to.
*/
SymbianFilesystemNode(const String &path);
-
- virtual bool exists() const {
+
+ virtual bool exists() const {
TFileName fname;
TPtrC8 ptr((const unsigned char*)_path.c_str(),_path.size());
fname.Copy(ptr);
@@ -79,18 +79,18 @@ public:
/**
* Returns the last component of a given path.
- *
+ *
* Examples:
* c:\foo\bar.txt would return "\bar.txt"
* c:\foo\bar\ would return "\bar\"
- *
+ *
* @param str Path to obtain the last component from.
* @return Pointer to the first char of the last component inside str.
*/
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
-
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
@@ -103,14 +103,14 @@ const char *lastPathComponent(const Common::String &str) {
/**
* Fixes the path by changing all slashes to backslashes.
- *
+ *
* @param path String with the path to be fixed.
*/
static void fixFilePath(Common::String& path) {
TInt len = path.size();
-
+
for (TInt index = 0; index < len; index++) {
- if (path[index] == '/') {
+ if (path[index] == '/') {
path[index] = '\\';
}
}
@@ -132,7 +132,7 @@ SymbianFilesystemNode::SymbianFilesystemNode(const String &path) {
_isPseudoRoot = false;
_path = path;
-
+
fixFilePath(_path);
_displayName = lastPathComponent(_path);
@@ -184,27 +184,27 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
TVolumeInfo volumeInfo;
TBuf8<30> driveLabel8;
TBuf8<30> driveString8;
-
+
for (driveNumber=EDriveA; driveNumber<=EDriveZ; driveNumber++) {
TInt err = fs.Volume(volumeInfo, driveNumber);
if (err != KErrNone)
- continue;
+ continue;
if (fs.DriveToChar(driveNumber,driveLetter) != KErrNone)
continue;
driveLetterValue = driveLetter;
- if (volumeInfo.iName.Length() > 0) {
+ if (volumeInfo.iName.Length() > 0) {
driveLabel8.Copy(volumeInfo.iName); // 16 to 8bit des // enabling this line alone gives KERN-EXEC 3 with non-optimized GCC? WHY? grrr
driveString8.Format(_L8("Drive %c: (%S)"), driveLetterValue, &driveLabel8);
} else {
driveString8.Format(_L8("Drive %c:"), driveLetterValue);
}
-
+
char path[10];
sprintf(path,"%c:\\", driveNumber+'A');
-
- SymbianFilesystemNode entry(false);
+
+ SymbianFilesystemNode entry(false);
entry._displayName = (char*)driveString8.PtrZ(); // drive_name
entry._isDirectory = true;
entry._isValid = true;
@@ -226,17 +226,17 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
nameBuf.Copy(fileentry.iName);
SymbianFilesystemNode entry(false);
entry._isPseudoRoot = false;
-
+
entry._displayName =(char*)nameBuf.PtrZ();
entry._path = _path;
entry._path +=(char*)nameBuf.PtrZ();
entry._isDirectory = fileentry.IsDir();
-
+
// Honor the chosen mode
if ((mode == FilesystemNode::kListFilesOnly && entry._isDirectory) ||
(mode == FilesystemNode::kListDirectoriesOnly && !entry._isDirectory))
continue;
-
+
if (entry._isDirectory)
entry._path += "\\";
myList.push_back(new SymbianFilesystemNode(entry));
@@ -244,7 +244,7 @@ bool SymbianFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
CleanupStack::PopAndDestroy(dirPtr);
}
}
-
+
return true;
}
@@ -267,7 +267,7 @@ AbstractFilesystemNode *SymbianFilesystemNode::getParent() const {
{
p = new SymbianFilesystemNode(true);
}
-
+
return p;
}
diff --git a/backends/fs/windows/windows-fs-factory.h b/backends/fs/windows/windows-fs-factory.h
index eb8ade1a8e..5989cbb17d 100644
--- a/backends/fs/windows/windows-fs-factory.h
+++ b/backends/fs/windows/windows-fs-factory.h
@@ -30,20 +30,20 @@
/**
* Creates WindowsFilesystemNode objects.
- *
+ *
* Parts of this class are documented in the base interface class, AbstractFilesystemFactory.
*/
-class WindowsFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<WindowsFilesystemFactory> {
+class WindowsFilesystemFactory : public AbstractFilesystemFactory, public Common::Singleton<WindowsFilesystemFactory> {
public:
typedef Common::String String;
-
+
virtual AbstractFilesystemNode *makeRootFileNode() const;
virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const;
virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const;
-
+
protected:
WindowsFilesystemFactory() {};
-
+
private:
friend class Common::Singleton<SingletonBaseType>;
};
diff --git a/backends/fs/windows/windows-fs.cpp b/backends/fs/windows/windows-fs.cpp
index 7777996345..a766132e94 100644
--- a/backends/fs/windows/windows-fs.cpp
+++ b/backends/fs/windows/windows-fs.cpp
@@ -141,7 +141,7 @@ private:
const char *lastPathComponent(const Common::String &str) {
if(str.empty())
return "";
-
+
const char *start = str.c_str();
const char *cur = start + str.size() - 2;
diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp
index 849d90dfc7..6865f3e537 100644
--- a/backends/midi/dmedia.cpp
+++ b/backends/midi/dmedia.cpp
@@ -18,8 +18,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $URL:
- * $Id: dmedia.cpp
+ * $URL:$
+ * $Id: dmedia.cpp$
*/
/*
@@ -27,7 +27,7 @@
* some code liberated from seq.cpp and coremidi.cpp
*/
-#if defined(IRIX)
+#if defined(IRIX)
#include "common/scummsys.h"
#include "sound/mpu401.h"
@@ -86,7 +86,7 @@ int MidiDriver_DMEDIA::open() {
if (getenv("SCUMMVM_MIDIPORT")) {
_deviceNum = atoi(getenv("SCUMMVM_MIDIPORT"));
_midiportName = mdGetName(_deviceNum);
- }
+ }
else
{
_midiportName = mdGetName(0);
diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp
index 963af86a6e..8b10cf07a4 100644
--- a/backends/midi/timidity.cpp
+++ b/backends/midi/timidity.cpp
@@ -168,7 +168,7 @@ int MidiDriver_TIMIDITY::open() {
return -1;
}
- /* should read greeting issued by server upon connect:
+ /* should read greeting issued by server upon connect:
* "220 TiMidity++ v2.13.2 ready)" */
res = timidity_ctl_command(NULL);
if (atoi(res) != 220) {
@@ -178,7 +178,7 @@ int MidiDriver_TIMIDITY::open() {
}
/*
- * setup buf and prepare data connection
+ * setup buf and prepare data connection
*/
/* should read: "200 OK" */
res = timidity_ctl_command("SETBUF %f %f", BUF_LOW_SYNC, BUF_HIGH_SYNC);
@@ -200,7 +200,7 @@ int MidiDriver_TIMIDITY::open() {
}
/*
- * open data connection
+ * open data connection
*/
data_port = atoi(res + 4);
if ((_data_fd = connect_to_server(timidity_host, data_port)) < 0) {
diff --git a/backends/module.mk b/backends/module.mk
index 2f889a1951..6e8430169f 100644
--- a/backends/module.mk
+++ b/backends/module.mk
@@ -21,5 +21,5 @@ MODULE_OBJS := \
saves/compressed/compressed-saves.o \
timer/default/default-timer.o
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/backends/platform/PalmOS/Src/base_event.cpp b/backends/platform/PalmOS/Src/base_event.cpp
index fb136d92e5..81eeb4e79c 100644
--- a/backends/platform/PalmOS/Src/base_event.cpp
+++ b/backends/platform/PalmOS/Src/base_event.cpp
@@ -208,7 +208,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) {
sy = -1;
else if (keyCurrentState & _keyExtra.bitDown)
sy = +1;
-
+
if (keyCurrentState & _keyExtra.bitLeft)
sx = -1;
else if (keyCurrentState & _keyExtra.bitRight)
@@ -222,7 +222,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) {
warpMouse(x, y);
return true;
- }
+ }
}
}
@@ -293,7 +293,7 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) {
k = Common::KEYCODE_RIGHT; break;
case chrLeftArrow:
k = Common::KEYCODE_LEFT; break;
-
+
// return
case chrLineFeed:
case chrCarriageReturn:
@@ -314,10 +314,10 @@ bool OSystem_PalmBase::pollEvent(Common::Event &event) {
return true;
// prevent crash when alarm is raised
- handled = ((ev.eType == keyDownEvent) &&
- (ev.data.keyDown.modifiers & commandKeyMask) &&
- ((ev.data.keyDown.chr == vchrAttnStateChanged) ||
- (ev.data.keyDown.chr == vchrAttnUnsnooze)));
+ handled = ((ev.eType == keyDownEvent) &&
+ (ev.data.keyDown.modifiers & commandKeyMask) &&
+ ((ev.data.keyDown.chr == vchrAttnStateChanged) ||
+ (ev.data.keyDown.chr == vchrAttnUnsnooze)));
// graffiti strokes, auto-off, etc...
if (!handled)
diff --git a/backends/platform/PalmOS/Src/base_gfx.cpp b/backends/platform/PalmOS/Src/base_gfx.cpp
index cee1329308..c96a258d52 100644
--- a/backends/platform/PalmOS/Src/base_gfx.cpp
+++ b/backends/platform/PalmOS/Src/base_gfx.cpp
@@ -99,7 +99,7 @@ void OSystem_PalmBase::setPalette(const byte *colors, uint start, uint num) {
base[i].r = colors[0];
base[i].g = colors[1];
base[i].b = colors[2];
-
+
extras_palette(i + start, colors[0], colors[1], colors[2]);
colors += 4;
}
@@ -134,7 +134,7 @@ void OSystem_PalmBase::setShakePos(int shakeOffset) {
void OSystem_PalmBase::updateScreen() {
// Check whether the palette was changed in the meantime and update the
- // screen surface accordingly.
+ // screen surface accordingly.
if (_paletteDirtyEnd != 0 && _setPalette) {
WinSetDrawWindow(WinGetDisplayWindow());
WinPalette(winPaletteSet, _paletteDirtyStart, _paletteDirtyEnd - _paletteDirtyStart, _currentPalette + _paletteDirtyStart);
diff --git a/backends/platform/PalmOS/Src/base_mouse.cpp b/backends/platform/PalmOS/Src/base_mouse.cpp
index 7af080e09d..93a1fd2209 100644
--- a/backends/platform/PalmOS/Src/base_mouse.cpp
+++ b/backends/platform/PalmOS/Src/base_mouse.cpp
@@ -54,10 +54,10 @@ void OSystem_PalmBase::setMouseCursor(const byte *buf, uint w, uint h, int hotsp
if (_mouseCurState.w != w || _mouseCurState.h != h) {
_mouseCurState.w = w;
_mouseCurState.h = h;
-
+
if (_mouseDataP)
free(_mouseDataP);
-
+
if (_mouseBackupP)
free(_mouseBackupP);
@@ -95,7 +95,7 @@ void OSystem_PalmBase::simulate_mouse(Common::Event &event, Int8 iHoriz, Int8 iV
x = (x >= _screenWidth ) ? _screenWidth - 1 : x;
y = (y < 0 ) ? 0 : y;
y = (y >= _screenHeight ) ? _screenHeight - 1 : y;
-
+
*xr = x;
*yr = y;
}
diff --git a/backends/platform/PalmOS/Src/be_base.cpp b/backends/platform/PalmOS/Src/be_base.cpp
index e85ba03ef1..3dadbe5286 100644
--- a/backends/platform/PalmOS/Src/be_base.cpp
+++ b/backends/platform/PalmOS/Src/be_base.cpp
@@ -45,13 +45,13 @@ OSystem_PalmBase::OSystem_PalmBase() {
_mode = _setMode;
_redawOSD = false;
_setPalette = true;
-
+
_offScreenH = NULL;
_screenH = NULL;
_offScreenP = NULL;
_screenP = NULL;
_screenPitch = gVars->screenPitch;
-
+
_wasKey = false;
_lastKeyModifier = kModifierNone;
_lastKeyRepeat = 100;
@@ -59,11 +59,11 @@ OSystem_PalmBase::OSystem_PalmBase() {
_showBatLow = false;
_batCheckTicks = SysTicksPerSecond() * 15;
_batCheckLast = TimGetTicks();
-
+
_saveMgr = 0;
_timerMgr = 0;
_mixerMgr = 0;
-
+
_mouseDataP = NULL;
_mouseBackupP = NULL;
_mouseVisible = false;
@@ -73,7 +73,7 @@ OSystem_PalmBase::OSystem_PalmBase() {
MemSet(&_mouseOldState, sizeof(_mouseOldState), 0);
MemSet(&_timer, sizeof(TimerType), 0);
MemSet(&_sound, sizeof(SoundType), 0);
-
+
_keyExtraRepeat = 0;
_keyExtraPressed = 0;
_keyExtraDelay = (gVars->arrowKeys) ? computeMsecs(125) : computeMsecs(25);
@@ -136,7 +136,7 @@ void OSystem_PalmBase::setTimerCallback(TimerProc callback, int timer) {
_timer.duration = timer;
_timer.nextExpiry = getMillis() + timer;
_timer.callback = callback;
- _timer.active = true;
+ _timer.active = true;
} else {
_timer.active = false;
}
@@ -155,7 +155,7 @@ void OSystem_PalmBase::quit() {
delete _saveMgr;
delete _timerMgr;
delete _mixerMgr;
-
+
exit(0);
}
diff --git a/backends/platform/PalmOS/Src/be_base.h b/backends/platform/PalmOS/Src/be_base.h
index a4c27cf2da..38b76fcb05 100644
--- a/backends/platform/PalmOS/Src/be_base.h
+++ b/backends/platform/PalmOS/Src/be_base.h
@@ -90,7 +90,7 @@ typedef struct {
class OSystem_PalmBase : public OSystem {
private:
virtual void int_initBackend() { }
-
+
virtual const GraphicsMode *int_getSupportedGraphicsModes() const;
virtual void int_updateScreen() = 0;
virtual void int_initSize(uint w, uint h) = 0;
@@ -104,9 +104,9 @@ private:
virtual void draw_mouse() = 0;
virtual void undraw_mouse() = 0;
-
+
virtual bool check_event(Common::Event &event, EventPtr ev) = 0;
-
+
virtual void timer_handler();
void battery_handler();
virtual void get_coordinates(EventPtr ev, Coord &x, Coord &y) = 0;
@@ -134,12 +134,12 @@ protected:
RGBColorType _currentPalette[256];
uint _paletteDirtyStart, _paletteDirtyEnd;
-
+
int _mode, _setMode;
int16 _screenWidth, _screenHeight;
Boolean _modeChanged, _gfxLoaded;
UInt32 _screenPitch;
-
+
PointType _screenOffset;
struct {
Coord w, h;
@@ -162,7 +162,7 @@ protected:
UInt32 bitActionA; // left mouse button
UInt32 bitActionB; // right mouse button
} _keyExtra;
-
+
bool _mouseVisible;
bool _mouseDrawn;
MousePos _mouseCurState;
@@ -171,14 +171,14 @@ protected:
int16 _mouseHotspotY;
byte _mouseKeyColor;
byte *_mouseDataP, *_mouseBackupP;
-
+
bool _wasKey;
UInt8 _lastKeyModifier;
UInt32 _lastKeyRepeat;
Boolean _useNumPad, _showBatLow;
UInt32 _batCheckTicks, _batCheckLast;
-
+
int _samplesPerSec;
public:
@@ -190,19 +190,19 @@ public:
bool hasFeature(Feature f);
bool getFeatureState(Feature f);
-
+
virtual void beginGFXTransaction();
virtual void endGFXTransaction();
-
+
virtual int16 getOverlayHeight();
virtual int16 getOverlayWidth();
-
+
virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b);
virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, uint8 &b);
-
+
virtual void setCursorPalette(const byte *colors, uint start, uint num);
virtual void disableCursorPalette(bool disable);
-
+
virtual void displayMessageOnOSD(const char *msg);
*/
const GraphicsMode *getSupportedGraphicsModes() const;
@@ -233,25 +233,25 @@ public:
void grabPalette(byte *colors, uint start, uint num);
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b) = 0;
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) = 0;
-
+
bool pollEvent(Common::Event &event);
-
+
virtual uint32 getMillis();
virtual void delayMillis(uint msecs);
-
+
virtual void setTimerCallback(TimerProc callback, int interval);
virtual MutexRef createMutex() { return NULL; }
virtual void lockMutex(MutexRef mutex) {}
virtual void unlockMutex(MutexRef mutex) {}
virtual void deleteMutex(MutexRef mutex) {}
-
+
int getOutputSampleRate() const { return _samplesPerSec; }
virtual Audio::Mixer *getMixer();
void quit();
virtual void setWindowCaption(const char *caption) = 0;
-
+
Common::SaveFileManager *getSavefileManager();
Common::TimerManager *getTimerManager();
};
diff --git a/backends/platform/PalmOS/Src/be_os5.cpp b/backends/platform/PalmOS/Src/be_os5.cpp
index f5744d6d0e..1fc61cffbf 100644
--- a/backends/platform/PalmOS/Src/be_os5.cpp
+++ b/backends/platform/PalmOS/Src/be_os5.cpp
@@ -29,7 +29,7 @@
OSystem_PalmOS5::OSystem_PalmOS5() : OSystem_PalmBase() {
_sound.active = false;
_setPalette = false;
-
+
_workScreenH = NULL;
_overlayH = NULL;
_isSwitchable = false;
@@ -67,9 +67,9 @@ void OSystem_PalmOS5::calc_rect(Boolean fullscreen) {
h = gVars->screenHeight * _screenHeight / _screenWidth;
_screenOffset.x = 0;
- _screenOffset.y = (gVars->screenHeight - h) / 2;
+ _screenOffset.y = (gVars->screenHeight - h) / 2;
}
-
+
_screenDest.w = w;
_screenDest.h = h;
}
diff --git a/backends/platform/PalmOS/Src/be_os5.h b/backends/platform/PalmOS/Src/be_os5.h
index c4d4560b19..99d1dd9dc1 100644
--- a/backends/platform/PalmOS/Src/be_os5.h
+++ b/backends/platform/PalmOS/Src/be_os5.h
@@ -115,7 +115,7 @@ private:
OverlayColor *_overlayP;
WinHandle _overlayH, _workScreenH;
int16 *_workScreenP;
-
+
Boolean _isSwitchable, _wasRotated;
virtual void int_initBackend();
@@ -183,7 +183,7 @@ public:
virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h);
virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
-
+
void setWindowCaption(const char *caption);
};
diff --git a/backends/platform/PalmOS/Src/be_os5ex.cpp b/backends/platform/PalmOS/Src/be_os5ex.cpp
index 1a5ea2bf78..05bf5e49ce 100644
--- a/backends/platform/PalmOS/Src/be_os5ex.cpp
+++ b/backends/platform/PalmOS/Src/be_os5ex.cpp
@@ -70,7 +70,7 @@ void OSystem_PalmOS5Ex::setTimerCallback(TimerProc callback, int timer) {
} else {
_timer.active = false;
}
-
+
if (!_timer.active)
_timerEx.timerID = 0;
}
diff --git a/backends/platform/PalmOS/Src/be_zodiac.cpp b/backends/platform/PalmOS/Src/be_zodiac.cpp
index 1990d3ddaa..bb78030290 100644
--- a/backends/platform/PalmOS/Src/be_zodiac.cpp
+++ b/backends/platform/PalmOS/Src/be_zodiac.cpp
@@ -38,7 +38,7 @@ void OSystem_PalmZodiac::int_initBackend() {
_keyExtra.bitDown = keyBitRockerDown;
_keyExtra.bitLeft = keyBitRockerLeft;
_keyExtra.bitRight = keyBitRockerRight;
-
+
// _keyExtra.bitActionA = keyBitActionD;
// _keyExtra.bitActionB = keyBitActionB;
}
diff --git a/backends/platform/PalmOS/Src/be_zodiac.h b/backends/platform/PalmOS/Src/be_zodiac.h
index 1adb06d049..58e2ca88ac 100644
--- a/backends/platform/PalmOS/Src/be_zodiac.h
+++ b/backends/platform/PalmOS/Src/be_zodiac.h
@@ -38,7 +38,7 @@ private:
TwGfxSurfaceType *_palmScreenP, *_tmpScreenP;
TwGfxSurfaceType *_overlayP;
Boolean _fullscreen;
-
+
TwGfxPointType _srcPos;
TwGfxRectType _srcRect, _dstRect;
TwGfxBitmapType _srcBmp;
@@ -61,7 +61,7 @@ public:
OSystem_PalmZodiac();
static OSystem *create();
-
+
void setFeatureState(Feature f, bool enable);
int getDefaultGraphicsMode() const;
diff --git a/backends/platform/PalmOS/Src/cd_aeroplayer.cpp b/backends/platform/PalmOS/Src/cd_aeroplayer.cpp
index e1785c9239..c30fba595c 100644
--- a/backends/platform/PalmOS/Src/cd_aeroplayer.cpp
+++ b/backends/platform/PalmOS/Src/cd_aeroplayer.cpp
@@ -36,7 +36,7 @@ AeroCDPlayer::AeroCDPlayer(OSystem *sys) {
bool AeroCDPlayer::init() {
aeroplayer_Startup();
_isInitialized = aeroplayer_PlayerIsActive();
-
+
if (_isInitialized)
_volumeLimit = aeroplayer_GetMaxVolumeIndex();
@@ -73,7 +73,7 @@ void AeroCDPlayer::setVolume(int volume) {
bool AeroCDPlayer::poll() {
return
- ( _pckLoops != 0 &&
+ ( _pckLoops != 0 &&
( getPosition() < _pckTrackEndFrame &&
getStatus() == AEROPLAYER_STATUS_PLAY
)
@@ -107,7 +107,7 @@ void AeroCDPlayer::update() {
forceStop();
else {
//_pckStopTime = 0;
-
+
if (_pckTrackStartFrame == 0 && _pckTrackDuration == 0) {
setPosition(0);
} else {
@@ -136,10 +136,10 @@ void AeroCDPlayer::play(int track, int num_loops, int start_frame, int duration)
Char fileP[100];
static const Char *ext[] = { "mp3", "ogg" };
-
+
// if (duration > 0)
// duration += 5;
-
+
_pckTrack = track;
_pckLoops = num_loops;
_pckTrackStartFrame = TO_MSECS(start_frame);
@@ -149,7 +149,7 @@ void AeroCDPlayer::play(int track, int num_loops, int start_frame, int duration)
aeroplayer_Pause();
aeroplayer_PlayTrack(gVars->VFS.volRefNum, fileP);
aeroplayer_Pause();
-
+
if (_pckTrackStartFrame == 0 && _pckTrackDuration == 0) {
_pckTrackDuration = getDuration();
} else {
@@ -157,7 +157,7 @@ void AeroCDPlayer::play(int track, int num_loops, int start_frame, int duration)
if (_pckTrackDuration == 0)
_pckTrackDuration = getDuration() - _pckTrackStartFrame;
}
-
+
aeroplayer_Play();
_pckStopTime = 0;
diff --git a/backends/platform/PalmOS/Src/cd_aeroplayer.h b/backends/platform/PalmOS/Src/cd_aeroplayer.h
index 2f39d45a6d..e54bc1d5ff 100644
--- a/backends/platform/PalmOS/Src/cd_aeroplayer.h
+++ b/backends/platform/PalmOS/Src/cd_aeroplayer.h
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#ifndef CD_AEROPLAYER_H
#define CD_AEROPLAYER_H
@@ -40,9 +40,9 @@ public:
void update();
void play(int track, int num_loops, int start_frame, int duration);
void stop();
-
+
void setVolume(int volume);
-
+
private:
OSystem *_sys;
Char gameP[15];
diff --git a/backends/platform/PalmOS/Src/cd_msa.cpp b/backends/platform/PalmOS/Src/cd_msa.cpp
index 1a9752852e..5812d49b6d 100644
--- a/backends/platform/PalmOS/Src/cd_msa.cpp
+++ b/backends/platform/PalmOS/Src/cd_msa.cpp
@@ -49,7 +49,7 @@ bool MsaCDPlayer::init() {
if (!(error = FtrGet(sonySysFtrCreator, sonySysFtrNumSysInfoP, (UInt32*)&sonySysFtrSysInfoP))) {
// not found with audio adapter ?!
- //if (sonySysFtrSysInfoP->libr & sonySysFtrSysInfoLibrMsa) {
+ //if (sonySysFtrSysInfoP->libr & sonySysFtrSysInfoLibrMsa) {
if ((error = SysLibFind(sonySysLibNameMsa, &_msaRefNum)))
if (error == sysErrLibNotFound)
error = SysLibLoad(sonySysFileTMsaLib, sonySysFileCMsaLib, &_msaRefNum);
@@ -59,11 +59,11 @@ bool MsaCDPlayer::init() {
// this doesn't work the same way on build-in MP3 device and external MP3 devices
if (!error) {
//MsaLibClose(_msaRefNum, msaLibOpenModeAlbum); // close the lib if we previously let it open (?) Need to add Notify for sonySysNotifyMsaEnforceOpenEvent just in case ...
- error = MsaLibOpen(_msaRefNum, msaLibOpenModeAlbum);
+ error = MsaLibOpen(_msaRefNum, msaLibOpenModeAlbum);
//if (error == msaErrAlreadyOpen)
// error = MsaLibEnforceOpen(_msaRefNum, msaLibOpenModeAlbum, appFileCreator);
-
+
//error = (error != msaErrStillOpen) ? error : errNone;
}
//}
@@ -156,7 +156,7 @@ void MsaCDPlayer::update() {
}
MsaStop(_msaRefNum, true);
-
+
if (_msaLoops == 0)
return;
@@ -194,13 +194,13 @@ void MsaCDPlayer::play(int track, int num_loops, int start_frame, int duration)
if (!num_loops && !start_frame)
return;
-
+
_msaTrack = track + gVars->CD.firstTrack - 1; // first track >= 1 ?, not 0 (0=album)
_msaLoops = num_loops;
_msaStartFrame = TO_MSECS(start_frame);
_msaDuration = TO_MSECS(duration);
- Err e;
+ Err e;
MemHandle trackH;
// stop current play if any
@@ -215,19 +215,19 @@ void MsaCDPlayer::play(int track, int num_loops, int start_frame, int duration)
MsaTime msaTime;
MsaTrackInfo *trackP;
UInt32 SU, fullLength;
-
+
// FIXME (?) : this enable MsaSuToTime to return the right value in some cases
MsaPlay(_msaRefNum, _msaTrack, 0, msa_PBRATE_SP);
MsaStop(_msaRefNum, true);
-
- // get the msa time
- trackP = (MsaTrackInfo *)MemHandleLock(trackH);
+
+ // get the msa time
+ trackP = (MsaTrackInfo *)MemHandleLock(trackH);
MsaSuToTime(_msaRefNum, trackP->totalsu, &msaTime);
SU = trackP->totalsu;
MemPtrUnlock(trackP);
MemHandleFree(trackH);
-
- // MSA frame in milli-seconds
+
+ // MSA frame in milli-seconds
fullLength = FROM_MIN(msaTime.minute);
fullLength += FROM_SEC(msaTime.second);
fullLength += msaTime.frame;
@@ -240,7 +240,7 @@ void MsaCDPlayer::play(int track, int num_loops, int start_frame, int duration)
} else {
_msaTrackLength = fullLength;
}
-
+
// try to play the track
if (start_frame == 0 && duration == 0) {
MsaPlay(_msaRefNum, _msaTrack, 0, msa_PBRATE_SP);
@@ -250,7 +250,7 @@ void MsaCDPlayer::play(int track, int num_loops, int start_frame, int duration)
_msaTrackStartSu = (UInt32) ((float)(_msaStartFrame) / ((float)fullLength / (float)SU));
_msaTrackEndSu = (UInt32) ((float)(_msaTrackLength) / ((float)fullLength / (float)SU));
_msaTrackEndSu += _msaTrackStartSu;
-
+
if (_msaTrackEndSu > SU)
_msaTrackEndSu = SU;
diff --git a/backends/platform/PalmOS/Src/cd_msa.h b/backends/platform/PalmOS/Src/cd_msa.h
index 8844e5b8c6..93ab279c8c 100644
--- a/backends/platform/PalmOS/Src/cd_msa.h
+++ b/backends/platform/PalmOS/Src/cd_msa.h
@@ -64,5 +64,5 @@ public:
UInt32 _msaTrackStartSu, _msaTrackEndSu;
UInt32 _msaTrackLength;
};
-
+
#endif
diff --git a/backends/platform/PalmOS/Src/cd_pockettunes.cpp b/backends/platform/PalmOS/Src/cd_pockettunes.cpp
index b647114fb8..5a9f3874eb 100644
--- a/backends/platform/PalmOS/Src/cd_pockettunes.cpp
+++ b/backends/platform/PalmOS/Src/cd_pockettunes.cpp
@@ -37,7 +37,7 @@ bool PckTunesCDPlayer::init() {
_isInitialized = PocketTunesIsRunning();
_isPlaying = false;
_pAction = NULL;
-
+
if (_isInitialized) {
_pAction = (PocketTunesAction*)MemPtrNew(sizeof(PocketTunesAction));
_volumeLimit = getVolumeLimit();
@@ -64,12 +64,12 @@ UInt32 PckTunesCDPlayer::getVolumeLimit() {
_pAction->action = kPocketTunesActionGetValue;
_pAction->data.getValueAction.which = kPtunesValueMaxVolume;
-
+
EvtGetEvent(&_eAction, evtNoWait);
if (PocketTunesCallSynch(_pAction) == errNone)
value = _pAction->data.getValueAction.value;
- return value;
+ return value;
}
UInt32 PckTunesCDPlayer::getStatus() {
@@ -83,8 +83,8 @@ UInt32 PckTunesCDPlayer::getStatus() {
EvtGetEvent(&_eAction, evtNoWait);
if (PocketTunesCallSynch(_pAction) == errNone)
status = _pAction->data.getStatusAction.status;
-
- return status;
+
+ return status;
}
UInt32 PckTunesCDPlayer::getPosition(UInt32 deflt) {
@@ -95,7 +95,7 @@ UInt32 PckTunesCDPlayer::getPosition(UInt32 deflt) {
_pAction->action = kPocketTunesActionGetValue;
_pAction->data.getValueAction.which = kPtunesValueSongPosition;
-
+
EvtGetEvent(&_eAction, evtNoWait);
if (PocketTunesCallSynch(_pAction) == errNone)
value = _pAction->data.getValueAction.value;
@@ -111,12 +111,12 @@ UInt32 PckTunesCDPlayer::getDuration() {
_pAction->action = kPocketTunesActionGetValue;
_pAction->data.getValueAction.which = kPtunesValueSongDuration;
-
+
EvtGetEvent(&_eAction, evtNoWait);
if (PocketTunesCallSynch(_pAction) == errNone)
value = _pAction->data.getValueAction.value;
- return value;
+ return value;
}
void PckTunesCDPlayer::setPosition(UInt32 value) {
@@ -203,16 +203,16 @@ void PckTunesCDPlayer::play(int track, int num_loops, int start_frame, int durat
EventType e;
Char nameP[256], fileP[100];
static const Char *ext[] = { "mp3", "ogg" };
-
+
_pckTrack = track;
_pckLoops = num_loops;
_pckTrackStartFrame = TO_MSECS(start_frame);
_pckTrackDuration = TO_MSECS(duration);
VFSVolumeGetLabel(gVars->VFS.volRefNum, nameP, 256);
-
+
StrPrintF(fileP, "/Palm/Programs/ScummVM/Audio/%s_%03ld.%s", gameP, (track + gVars->CD.firstTrack - 1), ext[gVars->CD.format]);
-
+
if (PocketTunesOpenFile(nameP, fileP, 0) == errNone) {
EvtGetEvent(&e, evtNoWait);
PocketTunesPauseIfPlaying();
diff --git a/backends/platform/PalmOS/Src/cd_pockettunes.h b/backends/platform/PalmOS/Src/cd_pockettunes.h
index 4decca44a8..4a8d797158 100644
--- a/backends/platform/PalmOS/Src/cd_pockettunes.h
+++ b/backends/platform/PalmOS/Src/cd_pockettunes.h
@@ -22,48 +22,48 @@
* $Id$
*
*/
-
+
#ifndef CD_POCKETTUNES_H
#define CD_POCKETTUNES_H
-
+
#include "cdaudio.h"
#include "pockettunes.h"
-
+
class PckTunesCDPlayer : public CDAudio {
public:
PckTunesCDPlayer(OSystem *sys);
bool init();
void release();
-
+
bool poll();
void update();
void play(int track, int num_loops, int start_frame, int duration);
void stop();
-
+
void setVolume(int volume);
-
+
private:
OSystem *_sys;
Char gameP[15];
-
+
PocketTunesAction *_pAction; // prevent memory fragmentation
EventType _eAction;
-
+
UInt32 getStatus();
void setPosition(UInt32 value);
UInt32 getDuration();
UInt32 getPosition(UInt32 deft);
-
- UInt32 _volumeLimit;
+
+ UInt32 _volumeLimit;
UInt32 getVolumeLimit();
-
+
Boolean _isPlaying;
// cdrom
UInt16 _pckLoops, _pckTrack;
UInt32 _pckTrackStartFrame, _pckTrackEndFrame;
UInt32 _pckStopTime, _pckTrackDuration;
};
-
+
#endif
-
+
diff --git a/backends/platform/PalmOS/Src/cdaudio.h b/backends/platform/PalmOS/Src/cdaudio.h
index 2c32c669e6..7a3f5e56e4 100644
--- a/backends/platform/PalmOS/Src/cdaudio.h
+++ b/backends/platform/PalmOS/Src/cdaudio.h
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#ifndef CDAUDIO_H
#define CDAUDIO_H
@@ -37,7 +37,7 @@
#define FROM_SEC(secs) ((UInt32)((secs) * 1000))
class CDAudio {
-public:
+public:
CDAudio() {
_isInitialized = false;
_volumeLevel = 100;
@@ -45,7 +45,7 @@ public:
virtual bool init() = 0;
virtual void release() = 0;
-
+
// OSystem functions
virtual bool poll() = 0;
virtual void play(int track, int num_loops, int start_frame, int duration) = 0;
diff --git a/backends/platform/PalmOS/Src/extend.cpp b/backends/platform/PalmOS/Src/extend.cpp
index 99352b8cdb..e2dbd8f093 100644
--- a/backends/platform/PalmOS/Src/extend.cpp
+++ b/backends/platform/PalmOS/Src/extend.cpp
@@ -43,7 +43,7 @@ void DrawStatus(Boolean show) {
if (OPTIONS_TST(kOptDisableOnScrDisp))
return;
- UInt8 x,y;
+ UInt8 x,y;
UInt32 depth, d1;
Boolean d2;
WinScreenMode(winScreenModeGet, &d1, &d1, &depth, &d2);
diff --git a/backends/platform/PalmOS/Src/init_golcd.cpp b/backends/platform/PalmOS/Src/init_golcd.cpp
index 63cc98e0ab..b09d3b104e 100644
--- a/backends/platform/PalmOS/Src/init_golcd.cpp
+++ b/backends/platform/PalmOS/Src/init_golcd.cpp
@@ -14,7 +14,7 @@ Err GoLCDInit(MemHandle *goLcdH) {
UInt16 refNum;
Boolean loaded = false;
*goLcdH = NULL;
-
+
if (e = SysLibFind(goLcdLibName, &refNum))
loaded = !(e = SysLibLoad(goLcdLibType, goLcdLibCreator, &refNum));
@@ -41,7 +41,7 @@ Err GoLCDRelease(MemHandle goLcdH) {
Err e;
GoLCDType *lcdP = (GoLCDType *)MemHandleLock(goLcdH);
- if (lcdP->refNum != sysInvalidRefNum)
+ if (lcdP->refNum != sysInvalidRefNum)
if (!(e = GoLcdLibClose(lcdP->refNum)))
e = SysLibRemove(lcdP->refNum);
@@ -115,7 +115,7 @@ Boolean GoLCDToggle(MemHandle goLcdH) {
GoLCDType *lcdP = (GoLCDType *)MemHandleLock(goLcdH);
active = lcdP->active;
MemPtrUnlock(lcdP);
-
+
GoLCDActivate(goLcdH, !active);
return (!active);
}
diff --git a/backends/platform/PalmOS/Src/init_palmos.cpp b/backends/platform/PalmOS/Src/init_palmos.cpp
index 7cee8f2935..3a72382362 100644
--- a/backends/platform/PalmOS/Src/init_palmos.cpp
+++ b/backends/platform/PalmOS/Src/init_palmos.cpp
@@ -75,7 +75,7 @@ UInt8 PalmScreenSize(Coord *stdw, Coord *stdh, Coord *fullw, Coord *fullh) {
UInt8 mode = 0;
Coord sw = 160;
- Coord sh = 160;
+ Coord sh = 160;
// Hi-Density present ?
if (!FtrGet(sysFtrCreator, sysFtrNumWinVersion, &ftr)) {
@@ -136,7 +136,7 @@ void PalmGetMemory(UInt32* storageMemoryP, UInt32* dynamicMemoryP, UInt32 *stora
UInt32 dynamicFree = 0;
// Iterate through each card to support devices with multiple cards.
- nCards = MemNumCards();
+ nCards = MemNumCards();
for (cardNo = 0; cardNo < nCards; cardNo++) {
// Iterate through the RAM heaps on a card (excludes ROM).
diff --git a/backends/platform/PalmOS/Src/init_sony.cpp b/backends/platform/PalmOS/Src/init_sony.cpp
index 915b3ec56f..ede7ae997a 100644
--- a/backends/platform/PalmOS/Src/init_sony.cpp
+++ b/backends/platform/PalmOS/Src/init_sony.cpp
@@ -121,7 +121,7 @@ UInt8 SonyScreenSize(UInt16 HRrefNum, Coord *stdw, Coord *stdh, Coord *fullw, Co
UInt8 mode = 0;
Coord sw = 160;
- Coord sh = 160;
+ Coord sh = 160;
Coord fw = sw;
Coord fh = sh;
@@ -158,6 +158,6 @@ UInt8 SonyScreenSize(UInt16 HRrefNum, Coord *stdw, Coord *stdh, Coord *fullw, Co
*stdh = sh;
*fullw = fw;
*fullh = fh;
-
+
return mode;
}
diff --git a/backends/platform/PalmOS/Src/init_stuffs.cpp b/backends/platform/PalmOS/Src/init_stuffs.cpp
index 33f55ae5ce..753d2ae548 100644
--- a/backends/platform/PalmOS/Src/init_stuffs.cpp
+++ b/backends/platform/PalmOS/Src/init_stuffs.cpp
@@ -33,7 +33,7 @@ UInt32 StuffsGetPitch(Coord fullw) {
if (OPTIONS_TST(kOptModeHiDensity)) {
WinScreenGetAttribute(winScreenRowBytes, &pitch);
-
+
// FIXME : hack for TT3 simulator (and real ?) return 28 on landscape mode
if (pitch < fullw)
pitch = fullw;
diff --git a/backends/platform/PalmOS/Src/launcher/app.cpp b/backends/platform/PalmOS/Src/launcher/app.cpp
index bcaff049ff..31c94da5b6 100644
--- a/backends/platform/PalmOS/Src/launcher/app.cpp
+++ b/backends/platform/PalmOS/Src/launcher/app.cpp
@@ -86,7 +86,7 @@ static Err AppStartCheckNotify() {
UInt32 romVersion;
Err err;
- err = FtrGet(sysFtrCreator, sysFtrNumNotifyMgrVersion, &romVersion);
+ err = FtrGet(sysFtrCreator, sysFtrNumNotifyMgrVersion, &romVersion);
if (!err) {
UInt16 cardNo;
LocalID dbID;
@@ -128,7 +128,7 @@ static Err AppStartLoadSkin() {
if (type != 'skin' || creator != appFileCreator)
err = dmErrInvalidParam;
}
-
+
if (!found || err)
MemSet(&(gPrefs->skin),sizeof(SkinInfoType),0);
}
@@ -141,13 +141,13 @@ static Err AppStartLoadSkin() {
if (!err)
err = DmDatabaseInfo (gPrefs->skin.cardNo, gPrefs->skin.dbID, gPrefs->skin.nameP, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
}
-
+
return err;
}
static Err AppStartCheckMathLib() {
Err e = MathlibInit();
-
+
switch (e) {
case errNone:
break;
@@ -158,7 +158,7 @@ static Err AppStartCheckMathLib() {
FrmCustomAlert(FrmErrorAlert,"Can't open MathLib !",0,0);
break;
}
-
+
return e;
}
@@ -262,7 +262,7 @@ Err AppStart(void) {
gPrefs->exitLauncher = true;
gPrefs->stdPalette = OPTIONS_TST(kOptDeviceOS5);
gPrefs->stylusClick = true;
-
+
} else {
PrefGetAppPreferences(appFileCreator, appPrefID, gPrefs, &dataSize, true);
}
@@ -274,7 +274,7 @@ Err AppStart(void) {
error = AppStartCheckHRmode();
if (error) return (error);
-
+
bDirectMode = (AppStartLoadSkin() != errNone);
// if volref previously defined, check if it's a valid one
@@ -318,8 +318,8 @@ static Err AppStopCheckNotify()
{
UInt32 romVersion;
Err err;
-
- err = FtrGet(sysFtrCreator, sysFtrNumNotifyMgrVersion, &romVersion);
+
+ err = FtrGet(sysFtrCreator, sysFtrNumNotifyMgrVersion, &romVersion);
if (!err) {
UInt16 cardNo;
LocalID dbID;
@@ -332,7 +332,7 @@ static Err AppStopCheckNotify()
SysNotifyUnregister(cardNo, dbID, sysNotifyDisplayResizedEvent, sysNotifyNormalPriority);
}
}
-
+
return err;
}
@@ -345,7 +345,7 @@ void AppStop(void) {
// Close and move Game list database
GamCloseDatabase(false);
- // Write the saved preferences / saved-state information. This data
+ // Write the saved preferences / saved-state information. This data
// will saved during a HotSync backup.
SavePrefs();
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp b/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp
index 7a6e35b1f9..eb4654ed10 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formCards.cpp
@@ -50,7 +50,7 @@ static void CardSlotFreeList() {
if (itemsText && itemsList) {
cards = MemPtrRecoverHandle(itemsList);
items = MemPtrRecoverHandle(itemsText);
-
+
itemsText = NULL;
itemsList = NULL;
}
@@ -88,13 +88,13 @@ static UInt16 CardSlotFillList(Boolean getRefNum = false) {
if (err || StrLen(labelP) == 0) { // if no label try to retreive card type
VolumeInfoType volInfo;
err = VFSVolumeInfo(volRefNum, &volInfo);
-
+
if (!err) {
ExpCardInfoType info;
err = ExpCardInfo(volInfo.slotRefNum, &info);
StrCopy(labelP, info.deviceClassStr);
}
-
+
if (err) // if err default name
StrPrintF(labelP,"Other Card %ld", other++);
}
@@ -103,7 +103,7 @@ static UInt16 CardSlotFillList(Boolean getRefNum = false) {
cards = MemHandleNew(sizeof(CardInfoType));
else
MemHandleResize(cards, MemHandleSize(cards) + sizeof(CardInfoType));
-
+
cardsInfo = (CardInfoType *)MemHandleLock(cards);
cardsInfo[counter].volRefNum = volRefNum;
StrCopy(cardsInfo[counter].nameP, labelP);
@@ -146,7 +146,7 @@ static UInt16 CardSlotFillList(Boolean getRefNum = false) {
// no card found ? free old list in any or return invalid volref
} else {
if (!getRefNum)
- CardSlotFreeList();
+ CardSlotFreeList();
else
return vfsInvalidVolRef;
}
@@ -240,7 +240,7 @@ static UInt16 ConfigTabSave() {
CardSlotCreateDirs();
CardSlotFreeList();
-
+
return updateCode;
}
@@ -341,7 +341,7 @@ Boolean CardSlotFormHandleEvent(EventPtr eventP) {
case CardSlotCancelButton:
CardSlotFormCancel();
break;
-
+
case TabCardGameListMoveCheckbox:
GameListTabDraw();
break;
@@ -352,7 +352,7 @@ Boolean CardSlotFormHandleEvent(EventPtr eventP) {
default:
break;
}
-
+
return handled;
}
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formEditGame.cpp b/backends/platform/PalmOS/Src/launcher/forms/formEditGame.cpp
index ceb4886dcf..0540c12577 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formEditGame.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formEditGame.cpp
@@ -66,7 +66,7 @@ static void GameTabInit(GameInfoType *gameInfoP) {
nameP = (Char *)MemHandleLock(nameH);
pathP = (Char *)MemHandleLock(pathH);
gameP = (Char *)MemHandleLock(gameH);
-
+
if (gameInfoP) {
LstSetSelection(list1P, gameInfoP->engine);
LstSetTopItem(list1P, gameInfoP->engine);
@@ -139,7 +139,7 @@ static Err GameTabSave(GameInfoType *gameInfoP) {
MemPtrFree(itemsText);
itemsText = NULL;
}
-
+
return errNone;
}
@@ -148,7 +148,7 @@ static void DisplayInit(GameInfoType *gameInfoP) {
list1P = (ListType *)GetObjectPtr(TabGameDisplayGfxListList);
list2P = (ListType *)GetObjectPtr(TabGameDisplayRenderList);
-
+
if (gameInfoP) {
LstSetSelection(list1P, gameInfoP->gfxMode);
LstSetSelection(list2P, gameInfoP->renderMode);
@@ -169,7 +169,7 @@ static void DisplayInit(GameInfoType *gameInfoP) {
static Err DisplaySave(GameInfoType *gameInfoP) {
ListType *list1P, *list2P;
- ControlType *cck6P, *cck7P, *cck8P;
+ ControlType *cck6P, *cck7P, *cck8P;
FormType *frmP = FrmGetActiveForm();
@@ -187,7 +187,7 @@ static Err DisplaySave(GameInfoType *gameInfoP) {
gameInfoP->fullscreen = CtlGetValue(cck7P);
gameInfoP->aspectRatio = CtlGetValue(cck8P);
}
-
+
return errNone;
}
@@ -257,7 +257,7 @@ static void OptionsInit(GameInfoType *gameInfoP) {
static Err OptionsSave(GameInfoType *gameInfoP) {
FieldType *fld4P, *fld5P, *fld6P;
- ControlType *cck1P, *cck2P, *cck3P, *cck4P, *cck5P;
+ ControlType *cck1P, *cck2P, *cck3P, *cck4P, *cck5P;
ListType *list2P, *list3P;
FormType *frmP = FrmGetActiveForm();
@@ -291,7 +291,7 @@ static Err OptionsSave(GameInfoType *gameInfoP) {
} else {
gameInfoP->language = LstGetSelection(list2P);
gameInfoP->platform = LstGetSelection(list3P);
-
+
gameInfoP->autoLoad = CtlGetValue(cck1P);
gameInfoP->bootParam = CtlGetValue(cck2P);
gameInfoP->setPlatform = CtlGetValue(cck3P);
@@ -302,7 +302,7 @@ static Err OptionsSave(GameInfoType *gameInfoP) {
gameInfoP->bootValue = StrAToI(FldGetTextPtr(fld5P));
gameInfoP->talkValue = StrAToI(FldGetTextPtr(fld6P));
}
-
+
return errNone;
}
@@ -371,7 +371,7 @@ static void GameManSave(UInt16 index) {
newGameInfo.version = curItemVersion;
newGameInfo.icnID = 0xFFFF;
newGameInfo.selected = true;
-
+
// default sound data
newGameInfo.musicInfo.volume.palm = 50;
newGameInfo.musicInfo.volume.music = 192;
@@ -383,7 +383,7 @@ static void GameManSave(UInt16 index) {
newGameInfo.musicInfo.sound.defaultTrackLength = 10;
newGameInfo.musicInfo.sound.firstTrack = 1;
}
-
+
GameTabSave(&newGameInfo);
DisplaySave(&newGameInfo);
OptionsSave(&newGameInfo);
@@ -397,14 +397,14 @@ static void GameManSave(UInt16 index) {
{
RectangleType rArea;
UInt16 posIndex, maxView;
-
+
// get the sorted index
index = GamGetSelected();
// if new item is out of the list bounds, change current list pos
SknGetListBounds(&rArea, NULL);
maxView = rArea.extent.y / sknInfoListItemSize;
posIndex = gPrefs->listPosition;
-
+
// if out of the current list position
if (!(index >= posIndex && index < (posIndex + maxView)))
gPrefs->listPosition = index; // this value is corrected in SknUpdateList if needed
@@ -421,7 +421,7 @@ static void GameManSave(UInt16 index) {
* FUNCTION: EditGameFormInit
* FUNCTION: EditGameFormHandleEvent
*
- * DESCRIPTION:
+ * DESCRIPTION:
*
* REVISION HISTORY:
*
@@ -468,14 +468,14 @@ static void EditGameBowser() {
UInt16 volRefNum = gPrefs->card.volRefNum;
Char *textP, *pathP = (Char *)MemPtrNew(kFileBrowserLibPathBufferSize);
pathP[0] = chrNull;
-
+
if (FileBrowserLibShowOpenDialog(refNum, &volRefNum, pathP, 0, 0, 0, "Game Data Path", kFileBrowserLibFlagNoFiles)) {
FieldPtr fldP;
MemHandle textH;
Int16 offset, copySize, maxSize;
-
+
fldP = (FieldType *)GetObjectPtr(TabGameInfoPathField);
- maxSize = FldGetMaxChars(fldP);
+ maxSize = FldGetMaxChars(fldP);
textH = FldGetTextHandle(fldP);
FldSetTextHandle(fldP, NULL);
@@ -518,7 +518,7 @@ Boolean EditGameFormHandleEvent(EventPtr eventP) {
EditGameCancel();
handled = true;
break;
-
+
case frmOpenEvent:
switch (gFormEditMode) {
case edtModeAdd:
@@ -567,11 +567,11 @@ Boolean EditGameFormHandleEvent(EventPtr eventP) {
case GameEditCancelButton:
EditGameCancel();
break;
-
+
case GameEditDeleteButton:
EditGameFormDelete(false);
break;
-
+
case TabGameInfoBrowsePushButton:
EditGameBowser();
break;
@@ -607,6 +607,6 @@ Boolean EditGameFormHandleEvent(EventPtr eventP) {
default:
break;
}
-
+
return handled;
}
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formMisc.cpp b/backends/platform/PalmOS/Src/launcher/forms/formMisc.cpp
index 509adfa735..35b44486e9 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formMisc.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formMisc.cpp
@@ -40,7 +40,7 @@ static Boolean ScummVMTabSave() {
fld1P = (FieldType *)GetObjectPtr(TabMiscScummVMDebugLevelField);
fld2P = (FieldType *)GetObjectPtr(TabMiscScummVMAutosaveField);
-
+
cckP[0] = (ControlType *)GetObjectPtr(TabMiscScummVMAutosaveCheckbox);
cckP[3] = (ControlType *)GetObjectPtr(TabMiscScummVMDebugCheckbox);
cckP[6] = (ControlType *)GetObjectPtr(TabMiscScummVMDemoCheckbox);
@@ -69,7 +69,7 @@ static Boolean ScummVMTabSave() {
gPrefs->debugLevel = StrAToI(FldGetTextPtr(fld1P));
gPrefs->autoSavePeriod = StrAToI(FldGetTextPtr(fld2P));
-
+
return true;
}
@@ -111,7 +111,7 @@ static void ExtsTabSave() {
gPrefs->lightspeed.enable = CtlGetValue(cckP[0]);
gPrefs->lightspeed.mode = LstGetSelection(list1P);
}
- if (OPTIONS_TST(kOptGoLcdAPI)) {
+ if (OPTIONS_TST(kOptGoLcdAPI)) {
cckP[1] = (ControlType *)GetObjectPtr(TabMiscExtsGolcdCheckbox);
gPrefs->goLCD = CtlGetValue(cckP[1]);
}
@@ -176,7 +176,7 @@ static void MiscFormSave() {
if (!ScummVMTabSave()) return;
PalmOSTabSave();
ExtsTabSave();
-
+
TabDeleteTabs(myTabP);
FrmReturnToMain();
}
@@ -216,7 +216,7 @@ static void MiscFormInit() {
TabMoveUpObject(frmP, TabMiscExtsNothingLabel, 12);
extsCnt--;
}
-
+
if (extsCnt)
FrmRemoveObject(&frmP, FrmGetObjectIndex(frmP, TabMiscExtsNothingLabel));
@@ -270,6 +270,6 @@ Boolean MiscFormHandleEvent(EventPtr eventP) {
default:
break;
}
-
+
return handled;
}
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp b/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp
index 641d646bb2..bb0ac894c2 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formSelect.cpp
@@ -197,10 +197,10 @@ static void SelectorFormInit() {
listP = (ListType *)FrmGetObjectPtr(frmP, FrmGetObjectIndex(frmP, EngineListList));
itemsText = (Char **)MemPtrNew(ENGINE_COUNT * sizeof(Char *));
-
+
for (int i = 0; i < ENGINE_COUNT; i++)
itemsText[i] = (Char *)engines[i].nameP;
-
+
LstSetListChoices (listP, itemsText, ENGINE_COUNT);
LstSetSelection(listP, 0);
@@ -251,7 +251,7 @@ Boolean SelectorFormHandleEvent(EventPtr eventP) {
case lstSelectEvent:
if (eventP->data.lstSelect.listID == EngineSupportedList)
LstSetSelection(eventP->data.lstSelect.pList, -1);
- else
+ else
SelectorSetList(eventP->data.lstSelect.selection);
handled = true;
break;
@@ -273,6 +273,6 @@ Boolean SelectorFormHandleEvent(EventPtr eventP) {
default:
break;
}
-
+
return handled;
}
diff --git a/backends/platform/PalmOS/Src/launcher/forms/forminfo.cpp b/backends/platform/PalmOS/Src/launcher/forms/forminfo.cpp
index 74622d8f14..3f4ab1b28f 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/forminfo.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/forminfo.cpp
@@ -43,10 +43,10 @@ static void SystemTabDraw() {
PalmGetMemory(&sm, &dm, &sf, 0);
stack = GetStackSize();
df = gVars->startupMemory;
-
+
WinSetTextColor(UIColorGetTableEntryIndex(UIObjectForeground));
FntSetFont(stdFont);
-
+
StrIToA(num, dm);
x = 147 - FntCharsWidth(num, StrLen(num)) + 5;
WinDrawChars(num, StrLen(num), x, 12 + 30);
@@ -115,7 +115,7 @@ Boolean InfoFormHandleEvent(EventPtr eventP) {
InfoFormInit();
handled = true;
break;
-
+
case frmCloseEvent:
InfoFormSave();
handled = true;
@@ -141,6 +141,6 @@ Boolean InfoFormHandleEvent(EventPtr eventP) {
default:
break;
}
-
+
return handled;
}
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formmain.cpp b/backends/platform/PalmOS/Src/launcher/forms/formmain.cpp
index 6a5520eb55..9970e608c9 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formmain.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formmain.cpp
@@ -48,7 +48,7 @@ static Err BeamMe() {
err = SendDatabase(0, dbID, "ScummVM.prc", "\nPlay your favorite LucasArts games");
else
err = DmGetLastErr();
-
+
return err;
}
@@ -107,7 +107,7 @@ static Boolean MainFormDoCommand(UInt16 command)
FrmPopupForm(GameEditForm);
handled = true;
break;
-
+
case MainGamesDelete:
EditGameFormDelete(true);
handled = true;
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp b/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp
index 8413216bb1..58eaa5b5fc 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formmusic.cpp
@@ -256,7 +256,7 @@ static void MusicFormInit(UInt16 index) {
recordH = DmQueryRecord(gameDB, index);
ogameInfoP = (GameInfoType *)MemHandleLock(recordH);
-
+
if (!ogameInfoP) {
FrmCustomAlert(FrmErrorAlert, "An error occured.",0,0);
return;
diff --git a/backends/platform/PalmOS/Src/launcher/forms/formtabs.cpp b/backends/platform/PalmOS/Src/launcher/forms/formtabs.cpp
index 0dd3427c1a..d3f18e39d7 100644
--- a/backends/platform/PalmOS/Src/launcher/forms/formtabs.cpp
+++ b/backends/platform/PalmOS/Src/launcher/forms/formtabs.cpp
@@ -26,7 +26,7 @@ void TabDeleteTabs(TabType *tabP) {
UInt16 cnt, num;
num = MemPtrSize(tabP->tabs) / sizeof(TabDataType);
- for (cnt = 0; cnt < num; cnt++)
+ for (cnt = 0; cnt < num; cnt++)
FrmDeleteForm(tabP->tabs[cnt].srcP);
delete tabP->tabs;
@@ -93,7 +93,7 @@ Err TabAddContent(FormType **frmP, TabType *tabP, const Char *nameP, UInt16 rscI
UInt16 items = LstGetNumberOfItems((ListType *)objP);
UInt16 trigger = id - 1;
trigger = (FrmGetObjectIndex((FormType *)*dstP, trigger) != frmInvalidObjectId) ? trigger : 0;
-
+
LstNewList(dstP, id, x, y, w, h, font, visible, trigger);
newP = (ListType *)FrmGetObjectPtr((FormType *)*dstP, FrmGetObjectIndex((FormType *)*dstP, id));
LstSetListChoices(newP, itemsP, items);
@@ -197,10 +197,10 @@ void TabSetActive(FormType *frmP, TabType *tabP, UInt16 num) {
r.topLeft.y -= 1;
WinSetForeColor(UIColorGetTableEntryIndex(UIObjectFrame));
- WinDrawRectangleFrame(simpleFrame, &r);
+ WinDrawRectangleFrame(simpleFrame, &r);
WinSetForeColor(line);
WinDrawLine(r.topLeft.x, r.topLeft.y, r.topLeft.x + r.extent.x - 1, r.topLeft.y);
- FrmShowObject(frmP, idx);
+ FrmShowObject(frmP, idx);
} else {
UInt8 frame = UIColorGetTableEntryIndex(UIObjectFrame);
@@ -211,7 +211,7 @@ void TabSetActive(FormType *frmP, TabType *tabP, UInt16 num) {
light.b = (255 - light.b) > 72 ? light.b + 72 : 255;
WinSetForeColor(WinRGBToIndex(&light));
- WinDrawRectangleFrame(simpleFrame, &r);
+ WinDrawRectangleFrame(simpleFrame, &r);
WinSetForeColor(frame);
WinDrawLine(r.topLeft.x - 1, r.topLeft.y + r.extent.y, r.topLeft.x + r.extent.x, r.topLeft.y + r.extent.y);
}
diff --git a/backends/platform/PalmOS/Src/launcher/games.cpp b/backends/platform/PalmOS/Src/launcher/games.cpp
index 2300a36f09..b223897fd5 100644
--- a/backends/platform/PalmOS/Src/launcher/games.cpp
+++ b/backends/platform/PalmOS/Src/launcher/games.cpp
@@ -94,7 +94,7 @@ static Err GamUpdateList() {
// new format
gitCur.version = curItemVersion;
-
+
if (version < itemVersion_300) {
gitCur.musicInfo.volume.palm = 50;
gitCur.musicInfo.volume.music = 192;
@@ -109,7 +109,7 @@ static Err GamUpdateList() {
if (version < itemVersion_310)
gitCur.engine = 0;
-
+
if (version < itemVersion_320)
gitCur.renderMode = 0;
@@ -159,34 +159,34 @@ static Err GamUpdateList() {
if (version <= itemVersion_340) {
gitCur.platform++;
-
+
if (gitCur.language == 3)
gitCur.language = 0;
else if (gitCur.language >= 11)
gitCur.language++;
}
-
+
if (version <= itemVersion_350)
if (gitCur.platform >= 9)
gitCur.platform++;
-
+
if (version <= itemVersion_351) {
if (gitCur.engine >= ENGINE_LURE) // newly added engine
gitCur.engine++;
-
+
if (gitCur.engine == ENGINE_SCUMM) // reorder
gitCur.engine = ENGINE_AGOS;
else if (gitCur.engine == ENGINE_AGOS)
gitCur.engine = ENGINE_SCUMM;
}
-
+
if (version <= itemVersion_352) {
if (gitCur.engine >= ENGINE_CINE) // newly added engine
gitCur.engine++;
-
+
gitCur.platform++;
}
-
+
if (version <= itemVersion_353)
gitCur.musicInfo.sound.drvMusic++;
@@ -288,16 +288,16 @@ static Err GamUpdateList() {
// to V3.5
gitCur.platform++;
-
+
if (gitCur.language == 3)
gitCur.language = 0;
else if (gitCur.language >= 11)
gitCur.language++;
-
+
// to V3.5.1
if (gitCur.platform >= 9)
gitCur.platform++;
-
+
//to V3.5.3
gitCur.musicInfo.sound.drvMusic++;
@@ -366,7 +366,7 @@ static Err GamUpdateList() {
FrmDeleteForm(frmP);
if (ofmP)
FrmSetActiveForm(ofmP);
- }
+ }
}
}
@@ -529,7 +529,7 @@ Boolean GamJumpTo(Char letter) {
GamUnselect();
DmWrite(game, OffsetOf(GameInfoType,selected), &newValue, sizeof(Boolean));
-
+
if (index < gPrefs->listPosition || index >= (gPrefs->listPosition + maxView))
gPrefs->listPosition = index;
}
diff --git a/backends/platform/PalmOS/Src/launcher/launch.cpp b/backends/platform/PalmOS/Src/launcher/launch.cpp
index 4dc1011a15..cb2d52b20e 100644
--- a/backends/platform/PalmOS/Src/launcher/launch.cpp
+++ b/backends/platform/PalmOS/Src/launcher/launch.cpp
@@ -95,7 +95,7 @@ UInt16 ModFind(const Char *f) {
if (!e) e = VFSFileClose(r);
if (!e) break;
}
-
+
return volRefNum;
}
@@ -105,7 +105,7 @@ static void ModSetStack(UInt32 newSize, UInt16 cardNo, LocalID dbID) {
if (dbRef) {
MemHandle pref = DmGetResource('pref',0);
UInt32 size = 0;
-
+
if (pref) {
SysAppPrefsType *data = (SysAppPrefsType *)MemHandleLock(pref);
size = data->stackSize;
@@ -273,7 +273,7 @@ Boolean StartScummVM(Int16 engine) {
case 5:
ArgsAdd(&argvP[argc], "--render-mode=", "hercGreen", &argc);
break;
- }
+ }
switch (gameInfoP->gfxMode) {
case 1:
@@ -311,7 +311,7 @@ Boolean StartScummVM(Int16 engine) {
"segacd",
"windows"
};
- ArgsAdd(&argvP[argc], "--platform=", platform[gameInfoP->platform], &argc);
+ ArgsAdd(&argvP[argc], "--platform=", platform[gameInfoP->platform], &argc);
}
// subtitles
@@ -354,7 +354,7 @@ Boolean StartScummVM(Int16 engine) {
else
ArgsAdd(&argvP[argc], "-e", "auto", &argc); // no driver, switch to auto
} else {
- ArgsAdd(&argvP[argc], "-e", drv[gameInfoP->musicInfo.sound.drvMusic], &argc);
+ ArgsAdd(&argvP[argc], "-e", drv[gameInfoP->musicInfo.sound.drvMusic], &argc);
}
// output rate
@@ -398,7 +398,7 @@ Boolean StartScummVM(Int16 engine) {
if (gPrefs->altIntro)
ArgsAdd(&argvP[argc], "--alt-intro", NULL, &argc);
}
-
+
if (engine == ENGINE_SCUMM) {
// demo mode ?
if (gPrefs->demoMode)
@@ -418,7 +418,7 @@ Boolean StartScummVM(Int16 engine) {
lightspeed= (gPrefs->lightspeed.enable ? gPrefs->lightspeed.mode : 255);
toLauncher= (gPrefs->exitLauncher);
- // gVars values
+ // gVars values
// (gVars->HRrefNum defined in checkHRmode on Clie)
#ifndef _DEBUG_ENGINE
gVars->VFS.volRefNum = (gPrefs->card.autoDetect ? vfsInvalidVolRef : gPrefs->card.volRefNum);
@@ -436,12 +436,12 @@ Boolean StartScummVM(Int16 engine) {
// user params
HWR_RSTALL();
-
+
if (gPrefs->goLCD)
HWR_SET(INIT_GOLCD);
else
OPTIONS_RST(kOptGoLcdAPI);
-
+
if (!gPrefs->autoOff)
HWR_SET(INIT_AUTOOFF);
diff --git a/backends/platform/PalmOS/Src/launcher/skin.cpp b/backends/platform/PalmOS/Src/launcher/skin.cpp
index ae042bcb39..3e8b0f0b96 100644
--- a/backends/platform/PalmOS/Src/launcher/skin.cpp
+++ b/backends/platform/PalmOS/Src/launcher/skin.cpp
@@ -232,7 +232,7 @@ void SknGetObjectBounds(DmOpenRef skinDBP, DmResID resID, RectangleType *rP) {
rP->topLeft.x = strTemp[sknInfoPosX] * 2;
rP->topLeft.y = strTemp[sknInfoPosY] * 2;
- MemPtrUnlock(strTemp);
+ MemPtrUnlock(strTemp);
DmReleaseResource(hStr);
}
@@ -274,8 +274,8 @@ UInt8 SknSetState(DmOpenRef skinDBP, DmResID resID, UInt8 newState) {
DmWrite(strTemp, 0, &newState, 1);
}
- MemPtrUnlock(strTemp);
- DmReleaseResource(hStr);
+ MemPtrUnlock(strTemp);
+ DmReleaseResource(hStr);
}
}
}
@@ -298,8 +298,8 @@ UInt8 SknGetDepth(DmOpenRef skinDBP) {
if (hStr) {
strTemp = (UInt8 *)MemHandleLock(hStr);
depth = *strTemp;
- MemPtrUnlock(strTemp);
- DmReleaseResource(hStr);
+ MemPtrUnlock(strTemp);
+ DmReleaseResource(hStr);
}
}
}
@@ -321,9 +321,9 @@ UInt8 SknGetState(DmOpenRef skinDBP, DmResID resID) {
if (hStr) {
strTemp = (UInt8 *)MemHandleLock(hStr);
- oldState = strTemp[sknInfoState];
- MemPtrUnlock(strTemp);
- DmReleaseResource(hStr);
+ oldState = strTemp[sknInfoState];
+ MemPtrUnlock(strTemp);
+ DmReleaseResource(hStr);
}
}
}
@@ -450,7 +450,7 @@ void SknUpdateList() {
x = rCopy.topLeft.x;
y = rCopy.topLeft.y;
rCopy.topLeft.x -= rField.topLeft.x;
- rCopy.topLeft.y -= rField.topLeft.y;
+ rCopy.topLeft.y -= rField.topLeft.y;
SknCopyBits(skinDBP, skinBackgroundImageTop, &rCopy, x, y);
// copy bottom bg
SknGetObjectBounds(skinDBP, skinBackgroundImageBottom, &rField);
@@ -458,7 +458,7 @@ void SknUpdateList() {
x = rCopy.topLeft.x;
y = rCopy.topLeft.y;
rCopy.topLeft.x -= rField.topLeft.x;
- rCopy.topLeft.y -= rField.topLeft.y;
+ rCopy.topLeft.y -= rField.topLeft.y;
SknCopyBits(skinDBP, skinBackgroundImageBottom, &rCopy, x, y);
FntSetFont(stdFont);
diff --git a/backends/platform/PalmOS/Src/launcher/start.cpp b/backends/platform/PalmOS/Src/launcher/start.cpp
index f492655cf8..b5e8f24884 100644
--- a/backends/platform/PalmOS/Src/launcher/start.cpp
+++ b/backends/platform/PalmOS/Src/launcher/start.cpp
@@ -97,9 +97,9 @@ Err SendDatabase (UInt16 cardNo, LocalID dbID, Char *nameP, Char *descriptionP)
* minimum requirement.
*
* PARAMETERS: requiredVersion - minimum rom version required
- * (see sysFtrNumROMVersion in SystemMgr.h
+ * (see sysFtrNumROMVersion in SystemMgr.h
* for format)
- * launchFlags - flags that indicate if the application
+ * launchFlags - flags that indicate if the application
* UI is initialized.
*
* RETURNED: error code or zero if rom is compatible
@@ -119,7 +119,7 @@ static Err RomVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags) {
FrmAlert (RomIncompatibleAlert);
- // Palm OS 1.0 will continuously relaunch this app unless we switch to
+ // Palm OS 1.0 will continuously relaunch this app unless we switch to
// another safe one.
if (romVersion <= kPalmOS10Version)
AppLaunchWithCommand(sysFileCDefaultApp, sysAppLaunchCmdNormalLaunch, NULL);
@@ -210,7 +210,7 @@ static Boolean AppHandleEvent(EventPtr eventP) {
}
return true;
}
-
+
return false;
}
@@ -218,7 +218,7 @@ static Boolean AppHandleEvent(EventPtr eventP) {
*
* FUNCTION: AppEventLoop
*
- * DESCRIPTION: This routine is the event loop for the application.
+ * DESCRIPTION: This routine is the event loop for the application.
*
* PARAMETERS: nothing
*
@@ -249,8 +249,8 @@ static void AppEventLoop(void) {
*
* DESCRIPTION: This is the main entry point for the application.
*
- * PARAMETERS: cmd - word value specifying the launch code.
- * cmdPB - pointer to a structure that is associated with the launch code.
+ * PARAMETERS: cmd - word value specifying the launch code.
+ * cmdPB - pointer to a structure that is associated with the launch code.
* launchFlags - word value providing extra information about the launch.
*
* RETURNED: Result of launch
@@ -324,7 +324,7 @@ static UInt32 ScummVMPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) {
case sysAppLaunchCmdNormalLaunch:
error = AppStart();
- if (error)
+ if (error)
goto end;
if (!bDirectMode) {
@@ -352,8 +352,8 @@ end:
*
* DESCRIPTION: This is the main entry point for the application.
*
- * PARAMETERS: cmd - word value specifying the launch code.
- * cmdPB - pointer to a structure that is associated with the launch code.
+ * PARAMETERS: cmd - word value specifying the launch code.
+ * cmdPB - pointer to a structure that is associated with the launch code.
* launchFlags - word value providing extra information about the launch.
* RETURNED: Result of launch
*
diff --git a/backends/platform/PalmOS/Src/launcher/start.h b/backends/platform/PalmOS/Src/launcher/start.h
index bccbc53f86..3ed52b465b 100644
--- a/backends/platform/PalmOS/Src/launcher/start.h
+++ b/backends/platform/PalmOS/Src/launcher/start.h
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#ifndef __START_H__
#define __START_H__
@@ -36,7 +36,7 @@ typedef struct {
//skin params
SkinInfoType skin; // card where is located the skin
- Boolean soundClick;
+ Boolean soundClick;
Boolean vibrator;
Boolean autoOff;
diff --git a/backends/platform/PalmOS/Src/modules.cpp b/backends/platform/PalmOS/Src/modules.cpp
index bfe2595b07..f66d7d6ae6 100644
--- a/backends/platform/PalmOS/Src/modules.cpp
+++ b/backends/platform/PalmOS/Src/modules.cpp
@@ -105,7 +105,7 @@ static UInt32 ModulesPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
LocalID dbID;
LaunchParamType *lp = (LaunchParamType *)cmdPBP;
-
+
gVars = lp->gVars;
argvP = lp->args.argv;
@@ -128,7 +128,7 @@ static UInt32 ModulesPalmMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags)
// MemPtrSetOwner(gVars, ownerID);
// ArgsSetOwner(argvP, ownerID); // will be freed by main(...)
// MemPtrFree(lp); // will be freed by the system on exit
-
+
run(lp->args.argc, argvP);
cardNo = 0;
diff --git a/backends/platform/PalmOS/Src/native/pace.h b/backends/platform/PalmOS/Src/native/pace.h
index dac855c3ba..b3e2d14593 100644
--- a/backends/platform/PalmOS/Src/native/pace.h
+++ b/backends/platform/PalmOS/Src/native/pace.h
@@ -52,9 +52,9 @@ extern GlobalsType global;
#ifdef __cplusplus
-# define PACE_CLASS_WRAPPER(rv) extern "C" rv
+# define PACE_CLASS_WRAPPER(rv) extern "C" rv
#else
-# define PACE_CLASS_WRAPPER(rv) rv
+# define PACE_CLASS_WRAPPER(rv) rv
#endif
#define PACE_CALLBACK_PTR g_call68KFuncP
#define PACE_EMULSTATE g_emulStateP
@@ -66,7 +66,7 @@ extern GlobalsType global;
#define PACE_PARAMS_INIT() \
UInt8 params[] = {
-
+
#define PACE_PARAMS_ADD8(param) \
(UInt8)(param), \
0,
@@ -91,7 +91,7 @@ extern GlobalsType global;
static_cast<void *>(PACE_EMULSTATE), \
PceNativeTrapNo(sysTrapPinsDispatch), \
NULL, 0)));
-
+
#define PACE_PIN_EXEC(pinTrap, returnType) \
PACE_EMULSTATE->regData[2] = pinTrap; \
return ((returnType)((PACE_CALLBACK_PTR)( \
@@ -100,4 +100,4 @@ extern GlobalsType global;
&params, \
sizeof(params))));
-#endif \ No newline at end of file
+#endif
diff --git a/backends/platform/PalmOS/Src/native/zodiacARM.cpp b/backends/platform/PalmOS/Src/native/zodiacARM.cpp
index 87de372943..7323bb6d69 100644
--- a/backends/platform/PalmOS/Src/native/zodiacARM.cpp
+++ b/backends/platform/PalmOS/Src/native/zodiacARM.cpp
@@ -74,11 +74,11 @@ static void Go() {
int argc;
#ifdef DEBUG_ARM
-// Tell the debugger we want to enable full debugging
- UInt32 flags = AdnDebugEnableGet();
- flags |= kAdnEnableMasterSwitch | kAdnEnableFullDebugging;
- AdnDebugEnableSet(flags);
-// Tell the debugger where our code lives in memory:
+// Tell the debugger we want to enable full debugging
+ UInt32 flags = AdnDebugEnableGet();
+ flags |= kAdnEnableMasterSwitch | kAdnEnableFullDebugging;
+ AdnDebugEnableSet(flags);
+// Tell the debugger where our code lives in memory:
AdnDebugNativeRegister(sysFileTApplication, appFileCreator, 'ARMC', 1);
#endif
@@ -102,9 +102,9 @@ static void Go() {
if (HWR_INIT(INIT_VIBRATOR)) gVars->vibrator = RumbleInit();
// run ...
- DO_EXIT ( palm_main(argc, argvP); )
+ DO_EXIT ( palm_main(argc, argvP); )
- // release
+ // release
if (HWR_INIT(INIT_VIBRATOR)) RumbleRelease();
stdio_release();
@@ -118,7 +118,7 @@ static void Go() {
Int8 *g_newStack, *g_newStackPos;
void *g_oldStack;
-static asm void *StkSwap(void *newStack ,void *dummy) {
+static asm void *StkSwap(void *newStack ,void *dummy) {
mov r1, r13
mov r13, r0
mov r0, r1
@@ -134,7 +134,7 @@ extern UInt32 PilotMain(UInt16 cmd, MemPtr cmdPBP, UInt16 launchFlags) {
g_newStack = (Int8 *)malloc(g_stackSize + 8);
g_newStackPos = (g_newStack + g_stackSize);
g_newStackPos -= ((UInt32)g_newStackPos & 7);
-
+
g_oldStack = StkSwap(g_newStackPos, 0);
Go();
diff --git a/backends/platform/PalmOS/Src/os5_gfx.cpp b/backends/platform/PalmOS/Src/os5_gfx.cpp
index 16ca267389..2d26419dff 100644
--- a/backends/platform/PalmOS/Src/os5_gfx.cpp
+++ b/backends/platform/PalmOS/Src/os5_gfx.cpp
@@ -40,7 +40,7 @@ WinHandle OSystem_PalmOS5::alloc_screen(Coord w, Coord h) {
UInt16 old = WinSetCoordinateSystem(kCoordinatesNative);
winH = WinCreateOffscreenWindow(w, h, nativeFormat, &e);
WinSetCoordinateSystem(old);
-
+
return winH;
}
@@ -162,9 +162,9 @@ void OSystem_PalmOS5::hotswap_gfx_mode(int mode) {
void OSystem_PalmOS5::unload_gfx_mode() {
if (!_gfxLoaded)
- return;
+ return;
_gfxLoaded = false;
-
+
// mouse data freed in quit()
free(_offScreenP);
@@ -172,7 +172,7 @@ void OSystem_PalmOS5::unload_gfx_mode() {
WinDeleteWindow(_workScreenH, false);
if (_overlayH)
WinDeleteWindow(_overlayH, false);
-
+
_workScreenH = NULL;
_overlayH = NULL;
diff --git a/backends/platform/PalmOS/Src/os5_mouse.cpp b/backends/platform/PalmOS/Src/os5_mouse.cpp
index 3b2c7840e6..0be9d3da46 100644
--- a/backends/platform/PalmOS/Src/os5_mouse.cpp
+++ b/backends/platform/PalmOS/Src/os5_mouse.cpp
@@ -30,7 +30,7 @@ void OSystem_PalmOS5::setCursorPalette(const byte *colors, uint start, uint num)
_mousePal[i + start] = gfxMakeDisplayRGB(colors[0], colors[1], colors[2]);
colors += 4;
}
-
+
_cursorPaletteDisabled = false;
}
@@ -42,7 +42,7 @@ void OSystem_PalmOS5::disableCursorPalette(bool disable) {
void OSystem_PalmOS5::draw_mouse() {
if (!_mouseDataP || _mouseDrawn || !_mouseVisible)
return;
-
+
byte *src = _mouseDataP;
int x = _mouseCurState.x - _mouseHotspotX;
@@ -145,7 +145,7 @@ void OSystem_PalmOS5::undraw_mouse() {
} else {
byte *dst = _offScreenP + _mouseOldState.y * _screenWidth + _mouseOldState.x;
byte *bak = _mouseBackupP;
-
+
do {
MemMove(dst, bak, _mouseOldState.w);
dst += _screenWidth;
@@ -154,4 +154,4 @@ void OSystem_PalmOS5::undraw_mouse() {
}
_mouseDrawn = false;
-} \ No newline at end of file
+}
diff --git a/backends/platform/PalmOS/Src/os5_sound.cpp b/backends/platform/PalmOS/Src/os5_sound.cpp
index 92147ef2a0..608b8af543 100644
--- a/backends/platform/PalmOS/Src/os5_sound.cpp
+++ b/backends/platform/PalmOS/Src/os5_sound.cpp
@@ -42,7 +42,7 @@ SoundExType _soundEx;
static Err sndCallback(void* UserDataP, SndStreamRef stream, void* bufferP, UInt32 *bufferSizeP) {
SoundExType *_soundEx = (SoundExType *)UserDataP;
SoundType *_sound = _soundEx->sound;
-
+
if (_soundEx->set && _soundEx->size) {
MemMove(bufferP, _soundEx->dataP, _soundEx->size);
*bufferSizeP = _soundEx->size;
@@ -53,7 +53,7 @@ static Err sndCallback(void* UserDataP, SndStreamRef stream, void* bufferP, UInt
MemSet(bufferP, 128, 0);
*bufferSizeP = 128;
}
-
+
return errNone;
}
diff --git a/backends/platform/PalmOS/Src/prefixes/compile.h b/backends/platform/PalmOS/Src/prefixes/compile.h
index bb48761fcf..40485a5927 100644
--- a/backends/platform/PalmOS/Src/prefixes/compile.h
+++ b/backends/platform/PalmOS/Src/prefixes/compile.h
@@ -38,7 +38,7 @@
#define DISABLE_SAGA
#define DISABLE_KYRA
#define DISABLE_AWE
-#define DISABLE_GOB
+#define DISABLE_GOB
#define DISABLE_LURE
#define DISABLE_CINE
#define DISABLE_AGI
diff --git a/backends/platform/PalmOS/Src/zodiac_event.cpp b/backends/platform/PalmOS/Src/zodiac_event.cpp
index 62abf8019d..f629c4cbd6 100644
--- a/backends/platform/PalmOS/Src/zodiac_event.cpp
+++ b/backends/platform/PalmOS/Src/zodiac_event.cpp
@@ -86,7 +86,7 @@ bool OSystem_PalmZodiac::check_event(Common::Event &event, EventPtr ev) {
if (_sound.active)
SndStreamPause(_soundEx.handle, true);
break;
-
+
case vchrLateWakeup:
// resume the sound thread if any
if (_sound.active)
diff --git a/backends/platform/PalmOS/Src/zodiac_gfx.cpp b/backends/platform/PalmOS/Src/zodiac_gfx.cpp
index 0c70aa9fe4..e7f7adb773 100644
--- a/backends/platform/PalmOS/Src/zodiac_gfx.cpp
+++ b/backends/platform/PalmOS/Src/zodiac_gfx.cpp
@@ -175,7 +175,7 @@ void OSystem_PalmZodiac::unload_gfx_mode() {
Err e;
if (!_gfxLoaded)
- return;
+ return;
_gfxLoaded = false;
if (_tmpScreenP) {
@@ -186,7 +186,7 @@ void OSystem_PalmZodiac::unload_gfx_mode() {
e = TwGfxFreeSurface(_overlayP);
e = TwGfxClose(_gfxH);
- UInt32 depth = 8;
+ UInt32 depth = 8;
WinScreenMode(winScreenModeSet, NULL, NULL, &depth, NULL);
clearScreen();
@@ -246,11 +246,11 @@ void OSystem_PalmZodiac::updateScreen() {
}
e = TwGfxDrawBitmap(_tmpScreenP, &pos, &_srcBmp);
e = TwGfxWaitForVBlank(_gfxH);
- e = TwGfxStretchBlt2(_palmScreenP, &dst, _tmpScreenP, &_srcRect, twGfxStretchFast| (gVars->filter ? twGfxStretchSmooth : 0));
-
+ e = TwGfxStretchBlt2(_palmScreenP, &dst, _tmpScreenP, &_srcRect, twGfxStretchFast| (gVars->filter ? twGfxStretchSmooth : 0));
+
} else {
TwGfxPointType pos = {_srcPos.x, _srcPos.y};
-
+
if (_new_shake_pos != _current_shake_pos) {
if (_new_shake_pos != 0) {
TwGfxRectType r = { _screenOffset.x, _screenOffset.y, _screenWidth, _new_shake_pos };
@@ -263,7 +263,7 @@ void OSystem_PalmZodiac::updateScreen() {
e = TwGfxDrawBitmap(_palmScreenP, &pos, &_srcBmp);
}
}
-
+
// undraw the mouse
undraw_mouse();
}
diff --git a/backends/platform/PalmOS/Src/zodiac_mouse.cpp b/backends/platform/PalmOS/Src/zodiac_mouse.cpp
index 80acdae5ea..6fa19d090b 100644
--- a/backends/platform/PalmOS/Src/zodiac_mouse.cpp
+++ b/backends/platform/PalmOS/Src/zodiac_mouse.cpp
@@ -28,7 +28,7 @@
void OSystem_PalmZodiac::draw_mouse() {
if (!_mouseDataP || _mouseDrawn || !_mouseVisible)
return;
-
+
byte *src = _mouseDataP;
int x = _mouseCurState.x - _mouseHotspotX;
diff --git a/backends/platform/PalmOS/Src/zodiac_overlay.cpp b/backends/platform/PalmOS/Src/zodiac_overlay.cpp
index 33e5da2ac4..34390853fc 100644
--- a/backends/platform/PalmOS/Src/zodiac_overlay.cpp
+++ b/backends/platform/PalmOS/Src/zodiac_overlay.cpp
@@ -43,7 +43,7 @@ void OSystem_PalmZodiac::clearOverlay() {
void OSystem_PalmZodiac::grabOverlay(OverlayColor *buf, int pitch) {
Err e;
OverlayColor *src;
-
+
e = TwGfxLockSurface(_overlayP, (void **)&src);
int h = _screenHeight;
do {
diff --git a/backends/platform/dc/cache.S b/backends/platform/dc/cache.S
index 1af1678ced..1a1595a9a1 100644
--- a/backends/platform/dc/cache.S
+++ b/backends/platform/dc/cache.S
@@ -1,6 +1,6 @@
.globl _flush_instruction_cache
-
+
.align 2
! Flush the SH instruction cache
diff --git a/backends/platform/dc/display.cpp b/backends/platform/dc/display.cpp
index 062df16a7e..f3bfc4b78f 100644
--- a/backends/platform/dc/display.cpp
+++ b/backends/platform/dc/display.cpp
@@ -161,7 +161,7 @@ void OSystem_Dreamcast::setCursorPalette(const byte *colors, uint start, uint nu
void OSystem_Dreamcast::disableCursorPalette(bool disable)
{
- _enable_cursor_palette = !disable;
+ _enable_cursor_palette = !disable;
}
void OSystem_Dreamcast::grabPalette(byte *colors, uint start, uint num)
diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp
index 334061f328..4bca47afb2 100644
--- a/backends/platform/dc/selector.cpp
+++ b/backends/platform/dc/selector.cpp
@@ -226,10 +226,10 @@ static int findGames(Game *games, int max)
else
files.push_back(*entry);
}
-
+
GameList candidates;
detectGames(files, candidates);
-
+
for (GameList::const_iterator ge = candidates.begin();
ge != candidates.end(); ++ge)
if (curr_game < max) {
@@ -237,7 +237,7 @@ static int findGames(Game *games, int max)
strcpy(games[curr_game].dir, dirs[curr_dir-1].name);
if (uniqueGame(games[curr_game].filename_base,
games[curr_game].dir, games, curr_game)) {
-
+
strcpy(games[curr_game].text, ge->description().c_str());
#if 0
printf("Registered game <%s> in <%s> <%s> because of <%s> <*>\n",
diff --git a/backends/platform/ds/arm7/Makefile b/backends/platform/ds/arm7/Makefile
index 41af6a2d71..9bb8e68b78 100644
--- a/backends/platform/ds/arm7/Makefile
+++ b/backends/platform/ds/arm7/Makefile
@@ -1,7 +1,7 @@
#---------------------------------------------------------------------------------
.SUFFIXES:
#---------------------------------------------------------------------------------
-
+
#---------------------------------------------------------------------------------
# TARGET is the name of the output, if this ends with _mb generates a multiboot image
# BUILD is the directory where object files & intermediate files will be placed
@@ -16,7 +16,7 @@ INCLUDES := include build
# Enable support for debugger (must be the same as in the arm9 makefile)
#USE_DEBUGGER = 1
-
+
#---------------------------------------------------------------------------------
# options for code generation
#---------------------------------------------------------------------------------
@@ -34,7 +34,7 @@ CFLAGS += $(INCLUDE) -DARM7
ifdef USE_DEBUGGER
CFLAGS += -DUSE_DEBUGGER
endif
-
+
CXXFLAGS := $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS := -g $(ARCH)
@@ -44,12 +44,12 @@ LDFLAGS := -g $(ARCH) -mno-fpu
# path to tools - this can be deleted if you set the path in windows
#---------------------------------------------------------------------------------
# export PATH := /d/dev/ds/devkitARM_r11/bin:/bin
-
+
#---------------------------------------------------------------------------------
# PATH to ndslib - just make a system variable called NDSLIBPATH and be done with it
#---------------------------------------------------------------------------------
# NDSLIBPATH := /d/dev/ds/ndslib/
-
+
#---------------------------------------------------------------------------------
# the prefix on the compiler executables
#---------------------------------------------------------------------------------
@@ -62,26 +62,26 @@ LIBS := -lnds7
ifdef USE_DEBUGGER
LIBS += -ldswifi7
endif
-
-
+
+
#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
# include and lib
#---------------------------------------------------------------------------------
LIBDIRS := /home/neil/devkitpror21/libnds home/neil/devkitpror21/libnds/nds
-
-
+
+
#---------------------------------------------------------------------------------
# no real need to edit anything past this point unless you need to add additional
# rules for different file extensions
#---------------------------------------------------------------------------------
ifneq ($(BUILD),$(notdir $(CURDIR)))
#---------------------------------------------------------------------------------
-
+
export OUTPUT := $(CURDIR)/$(TARGET)
-
+
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir))
-
+
export CC := $(PREFIX)gcc
export CXX := $(PREFIX)g++
export AR := $(PREFIX)ar
@@ -91,8 +91,8 @@ export OBJCOPY := $(PREFIX)objcopy
#---------------------------------------------------------------------------------
export LD := $(CXX)
#export LD := $(CC)
-
-CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
+
+CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
PCXFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.pcx)))
@@ -102,60 +102,60 @@ RAWFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.raw)))
MAPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.map)))
-
+
export OFILES := $(MAPFILES:.map=.o) $(RAWFILES:.raw=.o) $(PALFILES:.pal=.o) $(BINFILES:.bin=.o) $(PCXFILES:.pcx=.o)\
$(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
-
+
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) -I- -I$(CURDIR)/../commoninclude\
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
$(foreach dir,$(LIBDIRS),-I$(dir)/include/nds)\
-I$(CURDIR)/$(BUILD) -I$(CURDIR)/source/libcartreset
-
+
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
-
+
.PHONY: $(BUILD) clean
-
+
#---------------------------------------------------------------------------------
$(BUILD):
@[ -d $@ ] || mkdir -p $@
@echo $(OFILES)
@echo $(CFILES)
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
-
+
#---------------------------------------------------------------------------------
clean:
@echo clean ...$(TARGET)
@rm -fr $(BUILD) *.bin
-
-
+
+
#---------------------------------------------------------------------------------
else
-
+
DEPENDS := $(OFILES:.o=.d)
-
+
#---------------------------------------------------------------------------------
# main targets
#---------------------------------------------------------------------------------
$(OUTPUT).bin : $(OUTPUT).elf
-
+
$(OUTPUT).elf : $(OFILES)
-
+
#---------------------------------------------------------------------------------
%.bin: %.elf
@echo built ... $(notdir $@)
@$(OBJCOPY) -O binary $(TARGET).elf $@
-
+
#---------------------------------------------------------------------------------
%.elf:
echo ELF
@echo $(LD) $(LDFLAGS) -specs=ds_arm7.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $(TARGET).elf
@$(LD) $(LDFLAGS) -specs=ds_arm7.specs $(OFILES) $(LIBPATHS) $(LIBS) -o $(TARGET).elf
-
-
-
+
+
+
#---------------------------------------------------------------------------------
# Compile Targets for C/C++
#---------------------------------------------------------------------------------
@@ -166,20 +166,20 @@ $(OUTPUT).elf : $(OFILES)
@echo $(CXX) -MM $(CXXFLAGS) -o $*.d $<
@$(CXX) -MM $(CXXFLAGS) -o $*.d $<
@$(CXX) $(CXXFLAGS) -c $< -o$@
-
+
#---------------------------------------------------------------------------------
%.o : %.c
@echo $(notdir $<)
@echo $(CC) $(CFLAGS) -c $< -o$@
@$(CC) -MM $(CFLAGS) -o $*.d $<
@$(CC) $(CFLAGS) -c $< -o$@
-
+
#---------------------------------------------------------------------------------
%.o : %.s
@echo $(notdir $<)
@$(CC) -MM $(CFLAGS) -o $*.d $<
@$(CC) $(ASFLAGS) -c $< -o$@
-
+
define bin2o
cp $(<) $(*).tmp
$(OBJCOPY) -I binary -O elf32-littlearm -B arm \
@@ -192,31 +192,31 @@ define bin2o
echo "extern const u32" $(*)_size[]";" >> $(*).h
rm $(*).tmp
endef
-
+
#---------------------------------------------------------------------------------
%.o : %.pcx
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.raw
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.pal
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.map
#---------------------------------------------------------------------------------
@@ -229,9 +229,9 @@ endef
@echo $(notdir $<)
@$(bin2o)
-
+
-include $(DEPENDS)
-
+
#---------------------------------------------------------------------------------------
endif
#---------------------------------------------------------------------------------------
diff --git a/backends/platform/ds/arm7/source/libcartreset/cartreset.c b/backends/platform/ds/arm7/source/libcartreset/cartreset.c
index 2f27c1884e..db2f3cfddc 100644
--- a/backends/platform/ds/arm7/source/libcartreset/cartreset.c
+++ b/backends/platform/ds/arm7/source/libcartreset/cartreset.c
@@ -43,7 +43,7 @@ bool cartSetMenuMode(u32 _deviceType)
tmp = *(vu16*)(0x08800612);
tmp = *(vu16*)(0x08000000);
tmp = *(vu16*)(0x08801B66);
- tmp = *(vu16*)(0x08000000 + (mode << 1));
+ tmp = *(vu16*)(0x08000000 + (mode << 1));
tmp = *(vu16*)(0x0800080E);
tmp = *(vu16*)(0x08000000);
diff --git a/backends/platform/ds/arm7/source/libcartreset/cartreset_nolibfat.h b/backends/platform/ds/arm7/source/libcartreset/cartreset_nolibfat.h
index 79efa35e57..f1faebea37 100644
--- a/backends/platform/ds/arm7/source/libcartreset/cartreset_nolibfat.h
+++ b/backends/platform/ds/arm7/source/libcartreset/cartreset_nolibfat.h
@@ -53,5 +53,5 @@ void cartExecute();
}
#endif
-#endif
+#endif
diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp
index b7d9445e6e..dc2ff42fcb 100644
--- a/backends/platform/ds/arm7/source/main.cpp
+++ b/backends/platform/ds/arm7/source/main.cpp
@@ -28,9 +28,9 @@
//////////////////////////////////////////////////////////////////////
//#define USE_LIBCARTRESET
-
+
#include <nds.h>
-
+
#include <bios.h>
#include <arm7/touch.h>
#include <arm7/clock.h>
@@ -113,12 +113,12 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8
} else {
channel = 0;
}*/
-
+
if (channel > 1) channel = 1;
-
+
bytes &= ~7; // Multiple of 4 bytes!
// bytes += 4;
-
+
SCHANNEL_CR(channel) = 0;
SCHANNEL_TIMER(channel) = SOUND_FREQ(sampleRate);
SCHANNEL_SOURCE(channel) = ((uint32) (data));
@@ -130,7 +130,7 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8
SCHANNEL_SOURCE(channel + 2) = ((uint32) (data));
SCHANNEL_LENGTH(channel + 2) = ((bytes & 0x7FFFFFFF) >> 2);
SCHANNEL_REPEAT_POINT(channel + 2) = 0;
-
+
uint32 flags = SCHANNEL_ENABLE | SOUND_VOL(vol) | SOUND_PAN(pan);
switch (format) {
@@ -139,21 +139,21 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8
flags |= SOUND_REPEAT;// | (1 << 15);
break;
}
-
+
case 0: {
flags |= SOUND_16BIT;
flags |= SOUND_REPEAT;// | (1 << 15);
break;
}
-
+
case 2: {
flags |= SOUND_FORMAT_ADPCM;
flags |= SOUND_ONE_SHOT;// | (1 << 15);
-
+
SCHANNEL_SOURCE(channel) = (unsigned int) IPC->adpcm.buffer[0];
//bytes += 32;
SCHANNEL_LENGTH(channel) = (((bytes + 4) & 0x7FFFFFFF) >> 2);
-
+
SCHANNEL_CR(channel + 1) = 0;
SCHANNEL_SOURCE(channel + 1) = (unsigned int) IPC->adpcm.buffer[0];
SCHANNEL_LENGTH(channel + 1) = (((bytes + 4) & 0x7FFFFFFF) >> 2);
@@ -165,16 +165,16 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8
break;
}
}
-
-
+
+
// if (bytes & 0x80000000) {
// flags |= SOUND_REPEAT;
// } else {
// }
-
-
-
+
+
+
soundData = (vu8* ) data;
SCHANNEL_CR(channel) = flags;
@@ -186,11 +186,11 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8
for (volatile int i = 0; i < 16384 * 2; i++) {
// Delay loop - this makes everything stay in sync!
}
-
+
TIMER0_CR = 0;
TIMER0_DATA = SOUND_FREQ(sampleRate) * 2;
TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1;
-
+
TIMER1_CR = 0;
TIMER1_DATA = 65536 - ((bytes & 0x7FFFFFFF) >> 3); // Trigger four times during the length of the buffer
TIMER1_CR = TIMER_ENABLE | TIMER_IRQ_REQ | TIMER_CASCADE;
@@ -200,19 +200,19 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8
for (volatile int i = 0; i < 16384 * 2; i++) {
// Delay loop - this makes everything stay in sync!
}
-
+
TIMER2_CR = 0;
TIMER2_DATA = SOUND_FREQ(sampleRate) * 2;
TIMER2_CR = TIMER_ENABLE | TIMER_DIV_1;
-
+
TIMER3_CR = 0;
TIMER3_DATA = 65536 - ((bytes & 0x7FFFFFFF) >> 3); // Trigger four times during the length of the buffer
TIMER3_CR = TIMER_ENABLE | TIMER_IRQ_REQ | TIMER_CASCADE;
-
+
for (int r = 0; r < 4; r++) {
// IPC->streamFillNeeded[r] = true;
}
-
+
IPC->streamPlayingSection = 0;
}
@@ -221,7 +221,7 @@ void startSound(int sampleRate, const void* data, uint32 bytes, u8 channel=0, u8
// IPC->fillSoundFirstHalf = true;
// IPC->fillSoundSecondHalf = true;
// soundFirstHalf = true;
-
+
// REG_IME = IME_ENABLE;
}
@@ -247,7 +247,7 @@ uint16 powerManagerWrite(uint32 command, u32 data, bool enable) {
REG_SPICNT = SPI_ENABLE | SPI_BAUD_1MHz;
REG_SPIDATA = 0;
SerialWaitBusy();
-
+
result = REG_SPIDATA & 0xFF;
@@ -277,15 +277,15 @@ void performSleep() {
IRQ_HANDLER = DummyHandler;
IF = ~0;
IME = 1;
-
-
+
+
// Now save which interrupts are enabled, then set only the screens unfolding
// interrupt to be enabled, so that the first interrupt that happens is the
// one I want.
int saveInts = IE;
-
-
-
+
+
+
IE = IRQ_TIMER0; // Screens unfolding interrupt
// Now call the sleep function in the bios
@@ -294,26 +294,26 @@ void performSleep() {
TIMER0_CR = 0;
TIMER0_DATA = TIMER_FREQ(20);
TIMER0_CR = TIMER_ENABLE | TIMER_DIV_64;
-
+
swiDelay(100);
-
+
swiSleep();
swiDelay(100);
-
- powerManagerWrite(0, 0x30, b = !b);
+
+ powerManagerWrite(0, 0x30, b = !b);
} while (!(TIMER0_CR & TIMER_ENABLE));
-
+
TIMER0_CR = 0;
- // We're back from sleep, now restore the interrupt state and IRQ handler
+ // We're back from sleep, now restore the interrupt state and IRQ handler
IRQ_HANDLER = (void (*)()) irq;
IE = saveInts;
IF = ~0;
IME = 1;
-
-
+
+
powerManagerWrite(0, 0x30, false);
}
@@ -322,29 +322,29 @@ void performSleep() {
powerManagerWrite(0, 0x30, true);
IPC->performArm9SleepMode = true; // Tell ARM9 to sleep
-
+
// u32 irq = (u32) IRQ_HANDLER;
// IRQ_HANDLER = DummyHandler;
// POWER_CR &= ~POWER_SOUND;
-
+
// int saveInts = REG_IE;
// REG_IE = (1 << 22) | IRQ_VBLANK; // Lid open
// *((u32*) (0x0380FFF8)) = *((u32*) (0x0380FFF8)) | (REG_IE & REG_IF);
// VBLANK_INTR_WAIT_FLAGS = IRQ_VBLANK;
-
+
int r = 0;
while ((REG_KEYXY & (1 << 7))) { // Wait for lid to open
swiDelay(1000000);
r++;
}
-
+
// IRQ_HANDLER = (void (*)()) irq;
IPC->performArm9SleepMode = false; // Tell ARM9 to wake up
// REG_IE = saveInts;
-
+
// POWER_CR |= POWER_SOUND;
-
+
powerManagerWrite(0, 0x30, false);
}
@@ -353,33 +353,33 @@ void powerOff() {
}
//////////////////////////////////////////////////////////////////////
-
-
+
+
void InterruptTimer1() {
-
+
IPC->fillNeeded[playingSection] = true;
soundFilled[playingSection] = false;
-
+
if (playingSection == 3) {
// IME = IME_DISABLED;
-
+
// while (SCHANNEL_CR(0) & SCHANNEL_ENABLE) {
// }
-// SCHANNEL_CR(0) &= ~SCHANNEL_ENABLE;
-
+// SCHANNEL_CR(0) &= ~SCHANNEL_ENABLE;
+
// SCHANNEL_CR(0) |= SCHANNEL_ENABLE;
// TIMER1_CR = 0;
// TIMER1_CR = TIMER_ENABLE | TIMER_IRQ_REQ | TIMER_CASCADE;
-
+
playingSection = 0;
-
+
// IME = IME_ENABLED;
} else {
playingSection++;
}
-
+
IPC->playingSection = playingSection;
-
+
/* for (int r = 0; r < 4; r++) {
//if ((!soundFilled[r]) && (!IPC->fillNeeded[playingSection])) {
memcpy((void *) (soundBuffer + (r * 1024)), (void *) (arm9Buffer + (r * 1024)), 1024);
@@ -391,21 +391,21 @@ void InterruptTimer1() {
soundFilled[r] = true;
//}
}*/
-}
-
+}
+
void InterruptTimer3() {
while (IPC->adpcm.semaphore); // Wait for buffer to become free if needed
IPC->adpcm.semaphore = true; // Lock the buffer structure to prevent clashing with the ARM7
-
+
IPC->streamFillNeeded[IPC->streamPlayingSection] = true;
-
+
if (IPC->streamPlayingSection == 3) {
IPC->streamPlayingSection = 0;
} else {
IPC->streamPlayingSection++;
}
-
-
+
+
IPC->adpcm.semaphore = false;
}
@@ -416,10 +416,10 @@ void InterruptTimer3() {
// static int16 TOUCH_HEIGHT = TOUCH_CAL_Y2 - TOUCH_CAL_Y1;
// static int16 CNTRL_WIDTH = TOUCH_CNTRL_X2 - (TOUCH_CNTRL_X1 - 8);
// static int16 CNTRL_HEIGHT = TOUCH_CNTRL_Y2 - (TOUCH_CNTRL_Y1 - 8);
-
-
-
-
+
+
+
+
void InterruptVBlank() {
uint16 but=0, x=0, y=0, xpx=0, ypx=0, z1=0, z2=0, batt=0, aux=0;
int t1=0, t2=0;
@@ -428,7 +428,7 @@ void InterruptTimer3() {
static int heartbeat = 0;
// Update the heartbeat
heartbeat++;
-
+
// Read the X/Y buttons and the /PENIRQ line
but = REG_KEYXY;
if (!(but & 0x40)) {
@@ -437,28 +437,28 @@ void InterruptTimer3() {
// x = touchRead(TSC_MEASURE_X);
// y = touchRead(TSC_MEASURE_Y);
-
+
x = p.x;
y = p.y;
-
+
xpx = p.px;
ypx = p.py;
-
+
// xpx = ( ((SCREEN_WIDTH -60) * x) / TOUCH_WIDTH ) - TOUCH_OFFSET_X;
// ypx = ( ((SCREEN_HEIGHT-60) * y) / TOUCH_HEIGHT ) - TOUCH_OFFSET_Y;
-
+
// xpx = (IPC->touchX - (int16) TOUCH_CAL_X1) * CNTRL_WIDTH / TOUCH_WIDTH + (int16) (TOUCH_CNTRL_X1 - 8);
- // ypx = (IPC->touchY - (int16) TOUCH_CAL_Y1) * CNTRL_HEIGHT / TOUCH_HEIGHT + (int16) (TOUCH_CNTRL_Y1 - 8);
+ // ypx = (IPC->touchY - (int16) TOUCH_CAL_Y1) * CNTRL_HEIGHT / TOUCH_HEIGHT + (int16) (TOUCH_CNTRL_Y1 - 8);
+
-
z1 = touchRead(TSC_MEASURE_Z1);
z2 = touchRead(TSC_MEASURE_Z2);
}
-
+
if (but & (1 << 7)) { // Check if screen is folded
needSleep = true;
}
-
+
batt = touchRead(TSC_MEASURE_BATTERY);
aux = touchRead(TSC_MEASURE_AUX);
@@ -466,11 +466,11 @@ void InterruptTimer3() {
// Read the time
rtcGetTime((uint8 *)ct);
BCDToInteger((uint8 *)&(ct[1]), 7);
-
+
// Read the temperature
temp = touchReadTemperature(&t1, &t2);
-
-
+
+
// Update the IPC struct
IPC->heartbeat = heartbeat;
IPC->buttons = but;
@@ -491,7 +491,7 @@ void InterruptTimer3() {
IPC->tdiode1 = t1;
IPC->tdiode2 = t2;
-
+
//sound code :)
TransferSound *snd = IPC->soundData;
@@ -508,12 +508,12 @@ void InterruptTimer3() {
}
}
}
-
-
+
+
#ifdef USE_DEBUGGER
Wifi_Update(); // update wireless in vblank
#endif
-}
+}
//////////////////////////////////////////////////////////////////////
@@ -530,10 +530,10 @@ void arm7_fifo() { // check incoming fifo messages
if (msg==0x87654321) Wifi_Sync();
}
-
+
void initDebugger() {
-
+
// set up the wifi irq
irqSet(IRQ_WIFI, Wifi_Interrupt); // set up wifi interrupt
irqEnable(IRQ_WIFI);
@@ -558,7 +558,7 @@ void initDebugger() {
REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_RECV_IRQ;
Wifi_SetSyncHandler(arm7_synctoarm9); // allow wifi lib to notify arm9
- // arm7 wifi init complete
+ // arm7 wifi init complete
}
#endif
@@ -572,11 +572,11 @@ void reboot() {
int main(int argc, char ** argv) {
-
+
#ifdef USE_DEBUGGER
REG_IPC_FIFO_CR = IPC_FIFO_ENABLE | IPC_FIFO_SEND_CLEAR;
#endif
-
+
// Reset the clock if needed
rtcReset();
@@ -587,19 +587,19 @@ int main(int argc, char ** argv) {
IPC->reset = false;
-
-
+
+
for (int r = 0; r < 8; r++) {
IPC->adpcm.arm7Buffer[r] = (u8 *) malloc(512);
}
-
+
for (int r = 0; r < 4; r++) {
soundFilled[r] = false;
}
-
+
// Set up the interrupt handler
-
+
irqInit();
irqSet(IRQ_VBLANK, InterruptVBlank);
@@ -610,7 +610,7 @@ int main(int argc, char ** argv) {
irqSet(IRQ_TIMER3, InterruptTimer3);
irqEnable(IRQ_TIMER3);
-
+
/* REG_IME = 0;
IRQ_HANDLER = &InterruptHandler;
REG_IE = IRQ_VBLANK | IRQ_TIMER1 | IRQ_TIMER3;
@@ -619,10 +619,10 @@ int main(int argc, char ** argv) {
REG_IME = 1;
*/
-
-#ifdef USE_DEBUGGER
+
+#ifdef USE_DEBUGGER
initDebugger();
-#endif
+#endif
// Keep the ARM7 out of main RAM
while ((1)) {
@@ -646,6 +646,6 @@ int main(int argc, char ** argv) {
return 0;
}
-
+
//////////////////////////////////////////////////////////////////////
diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile
index a64de889ad..bc3d532e8d 100644
--- a/backends/platform/ds/arm9/makefile
+++ b/backends/platform/ds/arm9/makefile
@@ -54,10 +54,10 @@ ifdef DS_BUILD_F
# TODO: Fix this. When libmad is compiled in, the Kyrandia resource loading
# searches through it's entire index to find an mp3 each time a voice sample is requested
# this causes a nasty pause.
-else
+else
ifdef DS_BUILD_E
# TODO: Inherit the earth uses so much RAM that I have removed libmad in order to
- # claw some back.
+ # claw some back.
else
@@ -135,7 +135,7 @@ ifdef DS_BUILD_B
BUILD=scummvm-B
endif
-ifdef DS_BUILD_C
+ifdef DS_BUILD_C
DEFINES = -DDS_NON_SCUMM_BUILD -DDS_BUILD_C
LOGO = logoc.bmp
DISABLE_HE = 1
@@ -287,7 +287,7 @@ ifdef USE_PROFILER
CFLAGS += -mpoke-function-name -finstrument-functions -g
DEFINES += -DUSE_PROFILER
endif
-
+
CXXFLAGS= $(CFLAGS) -Wno-non-virtual-dtor -Wno-non-virtual-dtor \
-fno-exceptions -fno-rtti -mthumb-interwork
@@ -315,7 +315,7 @@ INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)
-I$(srcdir)/backends/fs -I$(srcdir)/backends/fs/ds -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\
-I$(srcdir)/scumm -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\
-I$(portdir)/source/libcartreset -include $(srcdir)/common/scummsys.h
-
+
LIBS = -lm -L$(libndsdir)/lib -L$(portdir)/lib -lnds9
ifdef USE_MAD
@@ -352,15 +352,15 @@ PORT_OBJS := $(portdir)/source/blitters_arm.o $(portdir)/source/cdaudio.o $(port
$(portdir)/source/osystem_ds.o $(portdir)/source/portdefs.o $(portdir)/source/ramsave.o\
$(portdir)/source/scummconsole.o $(portdir)/source/touchkeyboard.o $(portdir)/source/zipreader.o\
$(portdir)/source/dsoptions.o $(portdir)/source/keys.o $(portdir)/source/wordcompletion.o
-
+
ifdef USE_PROFILER
PORT_OBJS += $(portdir)/source/profiler/cyg-profile.o
endif
DATA_OBJS := $(portdir)/data/icons.o $(portdir)/data/keyboard.o $(portdir)/data/keyboard_pal.o $(portdir)/data/default_font.o $(portdir)/data/8x8font_tga.o
-
-
+
+
COMPRESSOR_OBJS := $(portdir)/source/compressor/lz.o
FAT_OBJS := $(portdir)/source/fat/disc_io.o $(portdir)/source/fat/gba_nds_fat.o\
@@ -379,13 +379,13 @@ FAT_OBJS := $(portdir)/source/fat/disc_io.o $(portdir)/source/fat/gba_nds_fat.o
# $(portdir)/source/fat/io_cf_common.o $(portdir)/source/fat/io_m3_common.o\
# $(portdir)/source/fat/io_sd_common.o $(portdir)/source/fat/io_scsd_s.o \
-# $(portdir)/source/fat/io_sc_common.o $(portdir)/source/fat/io_sd_common.o
+# $(portdir)/source/fat/io_sc_common.o $(portdir)/source/fat/io_sd_common.o
LIBCARTRESET_OBJS := $(portdir)/source/libcartreset/cartreset.o
-
+
# Files in this list will be optimisied for speed, otherwise they will be optimised for space
OPTLIST := actor.cpp ds_main.cpp osystem_ds.cpp blitters.cpp fmopl.cpp rate.cpp mixer.cpp isomap.cpp image.cpp gfx.cpp sprite.cpp actor_path.cpp actor_walk.cpp
-#OPTLIST :=
+#OPTLIST :=
# Compiler options for files which should be optimised for speed
OPT_SPEED := -O3
@@ -394,11 +394,11 @@ OPT_SPEED := -O3
OPT_SIZE := -Os -mthumb -fno-gcse -fno-schedule-insns2
-
-OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS)
-
-
+OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS)
+
+
+
MODULE_DIRS += .
ndsall:
@@ -448,7 +448,7 @@ endef
# $(*).tmp $(@)
# echo "extern const u8" $(notdir $*)"[] __attribute__ ((aligned (4)));" > $(*).h
# echo "extern const u32" $(notdir $(*))_size[]";" >> $(*).h
-#
+#
# echo $(*).h
# rm $(*).tmp
#endef
@@ -459,7 +459,7 @@ endef
##############
ifndef HAVE_GCC3
# If you use GCC, disable the above and enable this for intelligent
-# dependency tracking.
+# dependency tracking.
.cpp.o:
$(MKDIR) $(*D)/$(DEPDIR)
@@ -485,36 +485,36 @@ else
$(MKDIR) $(*D)/$(DEPDIR)
$(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
- $(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
+ $(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
endif
#---------------------------------------------------------------------------------
-
+
#---------------------------------------------------------------------------------
%.o : %.pcx
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.bin
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.raw
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.pal
#---------------------------------------------------------------------------------
@echo $(notdir $<)
@$(bin2o)
-
+
#---------------------------------------------------------------------------------
%.o : %.map
#---------------------------------------------------------------------------------
@@ -543,4 +543,4 @@ endif
#%.o: %.s
# $(MKDIR) $(*D)/$(DEPDIR)
# $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o
-
+
diff --git a/backends/platform/ds/arm9/source/blitters.cpp b/backends/platform/ds/arm9/source/blitters.cpp
index 582e15eb13..07c6b3fee1 100644
--- a/backends/platform/ds/arm9/source/blitters.cpp
+++ b/backends/platform/ds/arm9/source/blitters.cpp
@@ -27,25 +27,25 @@
namespace DS {
-void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
+void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch) {
if (height <= 0) height = 1;
if (width < 4) return;
-
-
+
+
width &= ~4;
// src = (const byte *) (((int) (src)) & (~4));
// dst = (byte *) (((int) (dst)) & (~4));
// text = (const byte *) (((int) (text)) & (~4));
-
+
asm ( "mov r5, %0\n" // Height
- "yLoop:\n"
+ "yLoop:\n"
"mov r3, #0\n" // X pos
-
+
"xLoop:\n"
-
+
"ldr r4, [%2, r3]\n" // Load text layer word
"cmp r4, %5\n"
"bne singleByteCompare\n"
@@ -54,7 +54,7 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s
"add r3, r3, #4\n"
"cmp r3, %1\n" // x == width?
"blt xLoop\n"
-
+
"add %2, %2, %8\n" // src += vs->pitch
"add %3, %3, %6\n" // dst += _vm->_screenWidth
"add %4, %4, %7\n" // text += _textSurface.pitch
@@ -62,8 +62,8 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s
"cmp r5, #0\n" // y == 0?
"bne yLoop\n"
"b end\n"
-
-
+
+
"singleByteCompare:\n"
"ldrb r4, [%2, r3]\n" // Load text byte
"cmps r4, %5, lsr #24\n" // Compare with mask
@@ -78,7 +78,7 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s
"ldreqb r4, [%3, r3]\n" // Otherwise Load src byte
"streqb r4, [%4, r3]\n" // Store it
"add r3, r3, #1\n"
-
+
"ldrb r4, [%2, r3]\n" // Load text byte
"cmps r4, %5, lsr #24\n" // Compare with mask
"strneb r4, [%4, r3]\n" // Store if not equal
@@ -91,7 +91,7 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s
"strneb r4, [%4, r3]\n" // Store if not equal
"ldreqb r4, [%3, r3]\n" // Otherwise Load src byte
"streqb r4, [%4, r3]\n" // Store it
- "add r3, r3, #1\n"
+ "add r3, r3, #1\n"
"cmps r3, %1\n" // x == width?
"blt xLoop\n" // Repeat
@@ -101,10 +101,10 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s
"sub r5, r5, #1\n" // y -= 1
"cmp r5, #0\n" // y == 0?
"bne yLoop\n"
-
+
"end:\n"
: /* no output registers */
- : "r" (height), "r" (width), "r" (text), "r" (src), "r" (dst), "r" (CHARSET_MASK_TRANSPARENCY | (CHARSET_MASK_TRANSPARENCY << 8) | (CHARSET_MASK_TRANSPARENCY << 16) | (CHARSET_MASK_TRANSPARENCY << 24)),
+ : "r" (height), "r" (width), "r" (text), "r" (src), "r" (dst), "r" (CHARSET_MASK_TRANSPARENCY | (CHARSET_MASK_TRANSPARENCY << 8) | (CHARSET_MASK_TRANSPARENCY << 16) | (CHARSET_MASK_TRANSPARENCY << 24)),
"r" (vsPitch), "r" (vmScreenWidth), "r" (textSurfacePitch)
: "r5", "r3", "r4", "%2", "%3", "%4", "memory");
}
@@ -115,7 +115,7 @@ void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height) {
asm("ands r0, %3, #1\n"
"addne %3, %3, #1\n"
"bne roll2\n"
-
+
"yLoop2:\n"
"ldr r0, [%2, #0]\n"
"str r0, [%0, #0]\n"
@@ -131,7 +131,7 @@ void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height) {
"add %0, %0, %1\n"
"add %2, %2, %1\n"
"subs %3, %3, #2\n"
- "bne yLoop2\n"
+ "bne yLoop2\n"
: /* no output registers */
: "r" (dst), "r" (dstPitch), "r" (src), "r" (height)
@@ -150,7 +150,7 @@ void ComputeDivBy5TableIFN()
for (int i=0; i<160; ++i)
{
DIV_BY_5[i] = (2*i+5)/10;
- }
+ }
}
#ifdef PERFECT_5_TO_4_RESCALING
@@ -163,13 +163,13 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3
u32 bs3 = s3 & 0x1F;
u32 bs4 = s4 & 0x1F;
-#if 0
+#if 0
u32 gs0 = (s0 >> 5) & 0x1F;
u32 gs1 = (s1 >> 5) & 0x1F;
u32 gs2 = (s2 >> 5) & 0x1F;
u32 gs3 = (s3 >> 5) & 0x1F;
u32 gs4 = (s4 >> 5) & 0x1F;
-
+
u32 rs0 = (s0 >> 10) & 0x1F;
u32 rs1 = (s1 >> 10) & 0x1F;
u32 rs2 = (s2 >> 10) & 0x1F;
@@ -191,22 +191,22 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3
asm("and %0, %2, %1, lsr #10" : "=r"(rs3) : "r"(s3), "r"(mask) : );
asm("and %0, %2, %1, lsr #10" : "=r"(rs4) : "r"(s4), "r"(mask) : );
#endif
-
+
u32 rd0 = 4*rs0 + rs1;
u32 rd1 = 2*rs1 + rs1 + 2*rs2;
u32 rd2 = 2*rs2 + 2*rs3 + rs3;
u32 rd3 = rs3 + 4*rs4;
-
+
u32 gd0 = 4*gs0 + gs1;
u32 gd1 = 2*gs1 + gs1 + 2*gs2;
u32 gd2 = 2*gs2 + 2*gs3 + gs3;
u32 gd3 = gs3 + 4*gs4;
-
+
u32 bd0 = 4*bs0 + bs1;
u32 bd1 = 2*bs1 + bs1 + 2*bs2;
u32 bd2 = 2*bs2 + 2*bs3 + bs3;
u32 bd3 = bs3 + 4*bs4;
-
+
#if 0
// Offsetting for correct rounding
rd0 = rd0*2+5; rd1 = rd1*2+5; rd2 = rd2*2+5; rd3 = rd3*2+5;
@@ -217,14 +217,14 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3
gd0 = (gd0 * 51) >> 9; gd1 = (gd1 * 51) >> 9; gd2 = (gd2 * 51) >> 9; gd3 = (gd3 * 51) >> 9;
bd0 = (bd0 * 51) >> 9; bd1 = (bd1 * 51) >> 9; bd2 = (bd2 * 51) >> 9; bd3 = (bd3 * 51) >> 9;
#else
- rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1]; rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3];
- gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1]; gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3];
- bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3];
+ rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1]; rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3];
+ gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1]; gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3];
+ bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3];
#endif
-
+
u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0;
u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2;
-
+
((u32*)dest)[0] = d10;
((u32*)dest)[1] = d32;
}
@@ -233,7 +233,7 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3
u16* dest)
{
static const u32 MASK = 0x03E07C1F;
-
+
u32 argbargbs0 = u32(s0) | (u32(s0) << 16);
u32 argbargbs1 = u32(s1) | (u32(s1) << 16);
u32 argbargbs2 = u32(s2) | (u32(s2) << 16);
@@ -245,32 +245,32 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3
u32 grbs2 = argbargbs2 & MASK;
u32 grbs3 = argbargbs3 & MASK;
u32 grbs4 = argbargbs4 & MASK;
-
+
u32 grbd0 = (3*grbs0 + grbs1) >> 2;
u32 grbd1 = ( grbs1 + grbs2) >> 1;
u32 grbd2 = ( grbs2 + grbs3) >> 1;
u32 grbd3 = ( grbs3 + 3*grbs4) >> 2;
-
+
grbd0 &= MASK;
grbd1 &= MASK;
grbd2 &= MASK;
grbd3 &= MASK;
-
+
u32 d0 = grbd0 | (grbd0 >> 16);
u32 d1 = grbd1 | (grbd1 >> 16);
u32 d2 = grbd2 | (grbd2 >> 16);
u32 d3 = grbd3 | (grbd3 >> 16);
-
- d0 &= 0xFFFF;
- d1 &= 0xFFFF;
- d2 &= 0xFFFF;
- d3 &= 0xFFFF;
-
- d0 |= 0x8000;
- d1 |= 0x8000;
- d2 |= 0x8000;
- d3 |= 0x8000;
-
+
+ d0 &= 0xFFFF;
+ d1 &= 0xFFFF;
+ d2 &= 0xFFFF;
+ d3 &= 0xFFFF;
+
+ d0 |= 0x8000;
+ d1 |= 0x8000;
+ d2 |= 0x8000;
+ d3 |= 0x8000;
+
dest[0] = d0;
dest[1] = d1;
dest[2] = d2;
@@ -287,13 +287,13 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3
u32 bd0 = (d0 << 24) >> 24;
u32 bd1 = (d1 << 24) >> 24;
u32 gd0 = (d0 << 16) >> 24;
- u32 gd1 = (d1 << 16) >> 24;
+ u32 gd1 = (d1 << 16) >> 24;
u32 rd0 = (d0 >> 16);
u32 rd1 = (d1 >> 16);
-
+
rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1];
gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1];
- bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1];
+ bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1];
u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0;
((u32*)dest)[0] = d10;
@@ -307,11 +307,11 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3
u32 rd2 = (d2 >> 16);
u32 rd3 = (d3 >> 16);
- rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3];
- gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3];
- bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3];
+ rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3];
+ gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3];
+ bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3];
u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2;
-
+
((u32*)dest)[1] = d32;
}
@@ -320,7 +320,7 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3
static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16* dest, const u8* src, const u32* palette)
{
ComputeDivBy5TableIFN();
-
+
for (size_t i=0; i<64; ++i)
{
u32 s0 = palette[src[5*i+0]];
@@ -353,7 +353,7 @@ static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16* dest, const
static inline void Rescale_320x1555Scanline_To_256x1555Scanline(u16* dest, const u16* src)
{
ComputeDivBy5TableIFN();
-
+
for (size_t i=0; i<64; ++i)
{
u16 s0 = src[5*i+0];
@@ -384,7 +384,7 @@ void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStri
for (size_t i=0; i<200; ++i)
{
- Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);
+ Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);
}
}
#else
@@ -396,7 +396,7 @@ void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStri
for (size_t i=0; i<200; ++i)
{
- Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);
+ Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam);
}
}
#endif
diff --git a/backends/platform/ds/arm9/source/blitters.h b/backends/platform/ds/arm9/source/blitters.h
index f8c65ed167..7434a58efd 100644
--- a/backends/platform/ds/arm9/source/blitters.h
+++ b/backends/platform/ds/arm9/source/blitters.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _BLITTERS_H_
#define _BLITTERS_H_
@@ -29,19 +29,19 @@
namespace DS {
-void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
+void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch);
void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height);
void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette);
void Rescale_320x256x1555_To_256x256x1555(u16* dest, const u16* src, int destStride, int srcStride);
}
-
+
#else
extern "C" {
-void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
+void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst,
int vsPitch, int vmScreenWidth, int textSurfacePitch);
void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height);
void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette);
diff --git a/backends/platform/ds/arm9/source/blitters.s b/backends/platform/ds/arm9/source/blitters.s
index 2f14c5a140..40b8782eec 100644
--- a/backends/platform/ds/arm9/source/blitters.s
+++ b/backends/platform/ds/arm9/source/blitters.s
@@ -21,7 +21,7 @@
@ @author Robin Watts (robin@wss.co.uk)
.text
-
+
.global asmDrawStripToScreen
.global asmCopy8Col
.global Rescale_320x256xPAL8_To_256x256x1555
@@ -142,7 +142,7 @@ asmCopy8Col:
@ r3 = height
STMFD r13!,{r14}
SUB r1,r1,#4
-
+
TST r3,#1
ADDNE r3,r3,#1
BNE roll2
@@ -177,7 +177,7 @@ Rescale_320x256x1555_To_256x256x1555:
@ r2 = dstStride
@ r3 = srcStride
STMFD r13!,{r4-r5,r8-r11,r14}
-
+
SUB r2,r2,#64*5 @ srcStride -= line length
SUB r3,r3,#64*4 @ dstStride -= line length
@@ -187,7 +187,7 @@ Rescale_320x256x1555_To_256x256x1555:
MOV r5, #200 @ r5 = y
yLoop3:
MOV r4, #64 @ r4 = x
-xLoop3:
+xLoop3:
LDRH r9, [r0],#2 @ r9 = src0
LDRH r10,[r0],#2 @ r10= src1
LDRH r11,[r0],#2 @ r11= src2
@@ -212,7 +212,7 @@ xLoop3:
ADD r11,r11,r12 @ r11= dst2
ADD r12,r12,r14 @ r12= src3 + src4
ADD r12,r12,r14,LSL #1 @ r12= src3 + src4*3 = dst3<<2
-
+
AND r9, r8, r9, LSR #2 @ r9 = dst0 (split)
AND r10,r8, r10,LSR #1 @ r10= dst1 (split)
AND r11,r8, r11,LSR #1 @ r11= dst2 (split)
@@ -227,7 +227,7 @@ xLoop3:
ORR r10,r10,#0x8000
ORR r11,r11,#0x8000
ORR r12,r12,#0x8000
-
+
STRH r9, [r1],#2
STRH r10,[r1],#2
STRH r11,[r1],#2
@@ -235,7 +235,7 @@ xLoop3:
SUBS r4,r4,#1
BGT xLoop3
-
+
ADD r0,r0,r2,LSL #1
ADD r1,r2,r3,LSL #1
SUBS r5,r5,#1
@@ -266,7 +266,7 @@ Rescale_320x256xPAL8_To_256x256x1555:
ORR r8, r8,#0x00007C00
ORR r8, r8,#0x03E00000 @ r8 = mask
LDR r9, [r13,#7*4] @ r9 = palette
-
+
SUB r13,r13,#256*4 @ r13 = 1K of space on the stack.
MOV r5, r13 @ r5 points to this space
MOV r14,#256
@@ -277,14 +277,14 @@ palLoop:
AND r10,r10,r8 @ r10 = separated palette entry
STR r10,[r5], #4
BGT palLoop
-
+
SUB r2,r2,#64*5 @ srcStride -= line length
SUB r3,r3,#64*4 @ dstStride -= line length
MOV r5,#200 @ r5 = y
yLoop4:
MOV r4,#64 @ r4 = x
-xLoop4:
+xLoop4:
LDRB r9, [r0],#1 @ r9 = src0
LDRB r10,[r0],#1 @ r10= src1
LDRB r11,[r0],#1 @ r11= src2
@@ -303,7 +303,7 @@ xLoop4:
ADD r11,r11,r12 @ r11= dst2
ADD r12,r12,r14 @ r12= src3 + src4
ADD r12,r12,r14,LSL #1 @ r12= src3 + src4*3 = dst3<<2
-
+
AND r9, r8, r9, LSR #2 @ r9 = dst0 (split)
AND r10,r8, r10,LSR #1 @ r10= dst1 (split)
AND r11,r8, r11,LSR #1 @ r11= dst2 (split)
@@ -318,7 +318,7 @@ xLoop4:
ORR r10,r10,#0x8000
ORR r11,r11,#0x8000
ORR r12,r12,#0x8000
-
+
STRH r9, [r1],#2
STRH r10,[r1],#2
STRH r11,[r1],#2
@@ -326,7 +326,7 @@ xLoop4:
SUBS r4,r4,#1
BGT xLoop4
-
+
ADD r0,r0,r2
ADD r1,r2,r3,LSL #1
SUBS r5,r5,#1
@@ -336,4 +336,4 @@ xLoop4:
LDMFD r13!,{r4-r5,r8-r11,PC}
-
+
diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp
index 9569a820f2..2897a9364b 100644
--- a/backends/platform/ds/arm9/source/cdaudio.cpp
+++ b/backends/platform/ds/arm9/source/cdaudio.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#include "cdaudio.h"
#include "ds-fs.h"
#include "config-manager.h"
@@ -53,9 +53,9 @@ struct WaveHeader {
u16 fmtExtraData; // Number of extra fmt bytes
u16 fmtExtra; // Samples per block (only for IMA-ADPCM files)
} __attribute__ ((packed));
-
+
struct chunkHeader {
- char name[4];
+ char name[4];
u32 size;
} __attribute__ ((packed));
@@ -112,7 +112,7 @@ void decompressBlock();
void allocBuffers() {
-
+
}
void setActive(bool active) {
@@ -125,17 +125,17 @@ bool getActive() {
void playTrack(int track, int numLoops, int startFrame, int duration) {
Common::String path = ConfMan.get("path");
-
+
if (isPlayingFlag) {
stopTrack();
}
-
+
if (trackStartsAt2) {
track++;
}
-
-
-
+
+
+
char str[100];
if (path[strlen(path.c_str()) - 1] == '/') {
@@ -145,50 +145,50 @@ void playTrack(int track, int numLoops, int startFrame, int duration) {
sprintf(str, "/track%d.wav", track);
path = path + str;
}
-
-
+
+
//1820160
-
+
file = DS::std_fopen(path.c_str(), "rb");
-
+
if (!file) {
consolePrintf("Failed to open %s!\n", path.c_str());
return;
}
-
-
+
+
DS::std_fread((const void *) &waveHeader, sizeof(waveHeader), 1, file);
-
+
consolePrintf("Playing track %d\n", track);
consolePrintf("Format: %d\n", waveHeader.fmtFormatTag);
consolePrintf("Rate : %d\n", waveHeader.fmtSamPerSec);
consolePrintf("Bits : %d\n", waveHeader.fmtBitsPerSam);
consolePrintf("BlkSz : %d\n", waveHeader.fmtExtra);
-
+
if ((waveHeader.fmtFormatTag != 17) && (waveHeader.fmtFormatTag != 20)) {
consolePrintf("Wave file is in the wrong format! You must use IMA-ADPCM 4-bit mono.\n");
DS::std_fclose(file);
return;
}
-
+
for (int r = 0; r < 8; r++) {
IPC->adpcm.buffer[r] = (u8 * volatile) (decoderFormat *) malloc(waveHeader.fmtBlockAlign);
IPC->adpcm.filled[r] = false;
IPC->adpcm.arm7Dirty[r] = false;
}
-
+
// Skip chunks until we reach the data chunk
chunkHeader chunk;
DS::std_fread((const void *) &chunk, sizeof(chunkHeader), 1, file);
-
+
while (!((chunk.name[0] == 'd') && (chunk.name[1] == 'a') && (chunk.name[2] == 't') && (chunk.name[3] == 'a'))) {
DS::std_fseek(file, chunk.size, SEEK_CUR);
DS::std_fread((const void *) &chunk, sizeof(chunkHeader), 1, file);
}
-
+
dataChunkStart = DS::std_ftell(file);
-
-
+
+
static bool started = false;
sampleNum = 0;
blockCount = 0;
@@ -206,35 +206,35 @@ void playTrack(int track, int numLoops, int startFrame, int duration) {
memset(audioBuffer, 0, BUFFER_SIZE * 2);
memset(decompressionBuffer, 0, waveHeader.fmtExtra * 2);
DS::playSound(audioBuffer, BUFFER_SIZE * 2, false, false, waveHeader.fmtSamPerSec);
-
- }
+
+ }
fillPos = (IPC->streamPlayingSection + 1) & 3;
isPlayingFlag = true;
-
-
+
+
// Startframe is a 75Hz timer. Dunno why, since nothing else
// seems to run at that rate.
int tenths = (startFrame * 10) / 75;
-
+
// Seek to the nearest block start to the start time
int samples = (tenths * waveHeader.fmtSamPerSec) / 10;
int block = samples / waveHeader.fmtExtra;
-
-
+
+
if (duration == 0) {
blocksLeft = 0;
} else {
blocksLeft = ((((duration * 100) / 75) * (waveHeader.fmtSamPerSec)) / (waveHeader.fmtExtra) / 100) + 10;
}
// consolePrintf("Playing %d blocks (%d)\n\n", blocksLeft, duration);
-
+
// No need to seek if we're starting from the beginning
if (block != 0) {
DS::std_fseek(file, dataChunkStart + block * waveHeader.fmtBlockAlign, SEEK_SET);
// consolePrintf("Startframe: %d msec: %d (%d,%d)\n", startFrame, tenthssec, samples, block);
}
-
-
+
+
//decompressBlock();
playNextBlock();
DS::CD::numLoops = numLoops;
@@ -252,21 +252,21 @@ extern "C" void ARM_adcpm(int *block, int len, int stepTableIndex,
void decompressBlock() {
int block[2048];
bool loop = false;
-
+
blockCount++;
-
+
if (blockCount < 10) return;
-
-
+
+
do {
DS::std_fread((const void *) &blockHeader, sizeof(blockHeader), 1, file);
-
+
DS::std_fread(&block[0], waveHeader.fmtBlockAlign - sizeof(blockHeader), 1, file);
if (DS::std_feof(file) ) {
// Reached end of file, so loop
-
-
+
+
if ((numLoops == -1) || (numLoops > 1)) {
// Seek file to first packet
if (numLoops != -1) {
@@ -283,14 +283,14 @@ void decompressBlock() {
stopTrack();
return;
}
-
+
} else {
loop = false;
}
-
+
} while (loop);
-
-
+
+
if (blocksLeft > 0) {
blocksLeft--;
// consolePrintf("%d ", blocksLeft);
@@ -305,37 +305,37 @@ void decompressBlock() {
blockHeader.stepTableIndex,
blockHeader.firstSample,
decompressionBuffer);
-#else
+#else
// First sample is in header
decompressionBuffer[0] = blockHeader.firstSample;
-
+
// Set up initial table indeces
int stepTableIndex = blockHeader.stepTableIndex;
int prevSample = blockHeader.firstSample;
-
+
// consolePrintf("Decompressing block step=%d fs=%d\n", stepTableIndex, prevSample);
for (int r = 0; r < waveHeader.fmtExtra - 1; r++) {
-
+
int word = block[r >> 3];
int offset = 0;
-
+
switch (7 - (r & 0x0007)) {
case 0: {
offset = (word & 0xF0000000) >> 28;
break;
}
-
+
case 1: {
offset = (word & 0x0F000000) >> 24;
break;
}
-
+
case 2: {
offset = (word & 0x00F00000) >> 20;
break;
}
-
+
case 3: {
offset = (word & 0x000F0000) >> 16;
break;
@@ -361,41 +361,41 @@ void decompressBlock() {
break;
}
}
-
+
int diff = 0;
-
+
if (offset & 4) {
diff = diff + stepTab[stepTableIndex];
}
-
+
if (offset & 2) {
diff = diff + (stepTab[stepTableIndex] >> 1);
}
-
+
if (offset & 1) {
diff = diff + (stepTab[stepTableIndex] >> 2);
}
-
+
diff = diff + (stepTab[stepTableIndex] >> 3);
-
+
if (offset & 8) {
- diff = -diff;
+ diff = -diff;
}
-
+
int newSample = prevSample + diff;
-
+
if (newSample > 32767) newSample = 32767;
if (newSample < -32768) newSample = -32768;
-
+
decompressionBuffer[r + 1] = newSample;
-
+
prevSample = newSample;
-
+
stepTableIndex += indexTab[offset];
-
+
if (stepTableIndex > 88) stepTableIndex = 88;
if (stepTableIndex < 0) stepTableIndex = 0;
-
+
}
#endif
@@ -404,21 +404,21 @@ void decompressBlock() {
void playNextBlock() {
if (!isPlayingFlag) return;
int lastBlockId = -1;
-
+
while (IPC->adpcm.semaphore); // Wait for buffer to become free if needed
IPC->adpcm.semaphore = true; // Lock the buffer structure to prevent clashing with the ARM7
// DC_FlushAll();
-
+
//-8644, 25088
for (int block = fillPos + 1; block < fillPos + 4; block++) {
int blockId = block & 3;
-
+
if (IPC->streamFillNeeded[blockId]) {
-
+
IPC->streamFillNeeded[blockId] = false;
// DC_FlushAll();
-
+
/* if (!(REG_KEYINPUT & KEY_R)) {
//consolePrintf("Align: %d First: %d Step:%d Res:%d\n", waveHeader.fmtBlockAlign, blockHeader.firstSample, blockHeader.stepTableIndex, blockHeader.reserved);
consolePrintf("Filling buffer %d\n", blockId);
@@ -432,19 +432,19 @@ void playNextBlock() {
}
}
}
-
+
lastBlockId = blockId;
IPC->streamFillNeeded[blockId] = false;
// DC_FlushAll();
}
-
-
-
+
+
+
}
-
-
-
+
+
+
if (lastBlockId != -1) {
fillPos = lastBlockId;
/* if (!(REG_KEYINPUT & KEY_R)) {
@@ -459,18 +459,18 @@ void stopTrack() {
if (!isPlayingFlag) return;
DS::std_fclose(file);
-
+
isPlayingFlag = false;
-
+
for (int r = 0; r < BUFFER_SIZE; r++) {
audioBuffer[r] = 0;
}
-
+
for (int r= 0; r < waveHeader.fmtExtra; r++) {
decompressionBuffer[r] = 0;
}
// DS::stopSound(1);
-
+
// free(audioBuffer);
// free(decompressionBuffer);
@@ -507,7 +507,7 @@ bool trackExists(int num) {
bool checkCD() {
// Need to check whethe CD audio files are present - do this by trying to open Track1.wav.
consolePrintf("Attempted to open cd drive\n");
-
+
if (trackExists(1)) {
trackStartsAt2 = false;
return true;
diff --git a/backends/platform/ds/arm9/source/cdaudio.h b/backends/platform/ds/arm9/source/cdaudio.h
index d237569bb7..a4a1a0bce9 100644
--- a/backends/platform/ds/arm9/source/cdaudio.h
+++ b/backends/platform/ds/arm9/source/cdaudio.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _CDAUDIO_H_
#define _CDAUDIO_H_
diff --git a/backends/platform/ds/arm9/source/console2.h b/backends/platform/ds/arm9/source/console2.h
index 6b9a677cc7..86434dcb93 100644
--- a/backends/platform/ds/arm9/source/console2.h
+++ b/backends/platform/ds/arm9/source/console2.h
@@ -25,7 +25,7 @@
//
// Changelog:
// 0.1: First version
-// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
+// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
// Changed some register defines for consistency.
//
//////////////////////////////////////////////////////////////////////
@@ -87,7 +87,7 @@ void consoleClear(void);
//
// Changelog:
// 0.1: First version
-// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
+// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
// Changed some register defines for consistency.
//
//////////////////////////////////////////////////////////////////////
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index 07eb222dfb..45b76fe0f1 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
// - Remove scummconsole.c
// - Delete files
@@ -221,7 +221,7 @@ int hBlankCount = 0;
gameListType gameList[NUM_SUPPORTED_GAMES] = {
// Unknown game - use normal SCUMM controls
{"unknown", CONT_SCUMM_ORIGINAL},
-
+
// SCUMM games
{"maniac", CONT_SCUMM_ORIGINAL},
{"zak", CONT_SCUMM_ORIGINAL},
@@ -232,7 +232,7 @@ gameListType gameList[NUM_SUPPORTED_GAMES] = {
{"monkey2", CONT_SCUMM_ORIGINAL},
{"tentacle", CONT_SCUMM_ORIGINAL},
{"samnmax", CONT_SCUMM_SAMNMAX},
-
+
// Non-SCUMM games
{"sky", CONT_SKY},
{"simon1", CONT_SIMON},
@@ -298,11 +298,11 @@ void setCpuScalerEnable(bool enable) {
//plays an 8 bit mono sample at 11025Hz
void playSound(const void* data, u32 length, bool loop, bool adpcm, int rate)
{
-
+
if (!IPC->soundData) {
soundControl.count = 0;
}
-
+
soundControl.data[soundControl.count].data = data;
soundControl.data[soundControl.count].len = length | (loop? 0x80000000: 0x00000000);
soundControl.data[soundControl.count].rate = rate; // 367 samples per frame
@@ -346,14 +346,14 @@ void initSprites() {
sprites[i].attribute[2] = 0;
sprites[i].attribute[3] = 0;
}
-
+
for (int i = 0; i < 128; i++) {
spritesMain[i].attribute[0] = ATTR0_DISABLED;
spritesMain[i].attribute[1] = 0;
spritesMain[i].attribute[2] = 0;
spritesMain[i].attribute[3] = 0;
}
-
+
updateOAM();
}
@@ -388,7 +388,7 @@ void restoreGameBackBuffer() {
*dst++ = *src;
*dst2++ = *src++;
}
-
+
}
delete savedBuffer;
@@ -414,22 +414,22 @@ void startSound(int freq, int buffer) {
bufferFirstHalf = false;
bufferSecondHalf = true;
-
+
int bytes = (2 * (bufferSamples)) + 100;
-
+
soundBuffer = (s16 *) malloc(bytes * 2);
if (!soundBuffer)
consolePrintf("Sound buffer alloc failed\n");
soundHiPart = true;
-
+
for (int r = 0; r < bytes; r++) {
soundBuffer[r] = 0;
}
soundFrequency = freq;
-
+
swiWaitForVBlank();
swiWaitForVBlank();
@@ -461,14 +461,14 @@ void initGame() {
consolePrintf("\n\n\n\nCurrent game: '%s' %d\n", gameName, gameName[0]);
currentGame = &gameList[0]; // Default game
-
+
for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) {
if (!stricmp(gameName, gameList[r].gameId)) {
currentGame = &gameList[r];
// consolePrintf("Game list num: %d\n", currentGame);
}
}
-
+
if (firstTime) {
firstTime = false;
@@ -515,7 +515,7 @@ void displayMode8Bit() {
consolePrintf("displayMode8Bit...");
#endif
u16 buffer[32 * 32];
-
+
setKeyboardEnable(false);
if (!displayModeIs8Bit) {
@@ -523,20 +523,20 @@ void displayMode8Bit() {
buffer[r] = ((u16 *) SCREEN_BASE_BLOCK_SUB(4))[r];
}
}
-
+
if (isCpuScalerEnabled())
{
- videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
+ videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
-
+
vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
vramSetBankB(VRAM_B_MAIN_BG_0x06020000);
-
+
vramSetBankC(VRAM_C_SUB_BG_0x06200000);
vramSetBankD(VRAM_D_MAIN_BG_0x06040000);
-
+
vramSetBankH(VRAM_H_LCD);
-
+
BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(8);
BG3_XDX = 256;
@@ -546,27 +546,27 @@ void displayMode8Bit() {
}
else
{
- videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
+ videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
-
+
vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
vramSetBankB(VRAM_B_MAIN_BG_0x06020000);
-
+
vramSetBankC(VRAM_C_SUB_BG_0x06200000);
vramSetBankD(VRAM_D_MAIN_BG_0x06040000);
-
+
vramSetBankH(VRAM_H_LCD);
-
+
BG3_CR = BG_BMP8_512x256 | BG_BMP_BASE(8);
-
+
BG3_XDX = (int) (((float) (gameWidth) / 256.0f) * 256);
BG3_XDY = 0;
BG3_YDX = 0;
BG3_YDY = (int) ((200.0f / 192.0f) * 256);
- }
-
+ }
+
SUB_BG3_CR = BG_BMP8_512x256;
-
+
SUB_BG3_XDX = (int) (subScreenWidth / 256.0f * 256);
SUB_BG3_XDY = 0;
SUB_BG3_YDX = 0;
@@ -578,24 +578,24 @@ void displayMode8Bit() {
BG0_CR = BG_MAP_BASE(2) | BG_TILE_BASE(0);
BG0_Y0 = 0;
-
- // Restore palette entry used by text in the front-end
+
+ // Restore palette entry used by text in the front-end
// PALETTE_SUB[255] = savedPalEntry255;
-
+
consoleInitDefault((u16*)SCREEN_BASE_BLOCK(2), (u16*)CHAR_BASE_BLOCK(0), 16);
consolePrintSet(0, 23);
-
+
if (!displayModeIs8Bit) {
for (int r = 0; r < 32 * 32; r++) {
((u16 *) SCREEN_BASE_BLOCK(2))[r] = buffer[r];
}
// dmaCopyHalfWords(3, (u16 *) SCREEN_BASE_BLOCK(0), buffer, 32 * 32 * 2);
}
-
+
initGame();
-
+
if (!displayModeIs8Bit) restoreGameBackBuffer();
displayModeIs8Bit = true;
#ifdef HEAVY_LOGGING
@@ -604,9 +604,9 @@ void displayMode8Bit() {
POWER_CR &= ~POWER_SWAP_LCDS;
-
+
keyboardEnable = false;
-
+
}
void setGameID(int id) {
@@ -619,22 +619,22 @@ void dummyHandler() {
void checkSleepMode() {
if (IPC->performArm9SleepMode) {
-
+
consolePrintf("ARM9 Entering sleep mode\n");
-
+
int intSave = REG_IE;
irqSet(IRQ_VBLANK, dummyHandler);
// int irqHandlerSave = (int) IRQ_HANDLER;
REG_IE = IRQ_VBLANK;
//IRQ_HANDLER = dummyHandler;
-
+
int powerSave = POWER_CR;
POWER_CR &= ~POWER_ALL;
-
+
while (IPC->performArm9SleepMode) {
swiWaitForVBlank();
}
-
+
POWER_CR = powerSave;
// IRQ_HANDLER = (void (*)()) irqHandlerSave;
irqSet(IRQ_VBLANK, VBlankHandler);
@@ -671,14 +671,14 @@ void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX,
{
int off = 128*64;
-
-
+
+
memset(SPRITE_GFX + off, 0, 32 * 32 * 2);
-
+
for (uint y=0; y<h; y++) {
for (uint x=0; x<w; x++) {
int color = icon[y*w+x];
-
+
if (color == keycolor) {
SPRITE_GFX[off+(y)*32+x] = 0x0000; // black background
} else {
@@ -686,22 +686,22 @@ void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX,
}
}
}
-
+
}
if (currentGame->control != CONT_SCUMM_SAMNMAX)
return;
uint16 border = RGB15(24,24,24) | 0x8000;
-
-
+
+
int off = 48*64;
memset(SPRITE_GFX_SUB+off, 0, 64*64*2);
-
+
int pos = 190 - (w+2);
-
-
+
+
// make border
for (uint i=0; i<w+2; i++) {
SPRITE_GFX_SUB[off+i] = border;
@@ -711,7 +711,7 @@ void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX,
SPRITE_GFX_SUB[off+(i*64)] = border;
SPRITE_GFX_SUB[off+(i*64)+(w+1)] = border;
}
-
+
int offset = (32 - h) >> 1;
for (uint y=0; y<h; y++) {
@@ -725,8 +725,8 @@ void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX,
}
}
}
-
-
+
+
if ((cursorEnable))
{
sprites[1].attribute[0] = ATTR0_BMP | 150;
@@ -758,7 +758,7 @@ void displayMode16Bit() {
}
- videoSetMode(MODE_5_2D | /*DISPLAY_BG0_ACTIVE |*/ DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
+ videoSetMode(MODE_5_2D | /*DISPLAY_BG0_ACTIVE |*/ DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
videoSetModeSub(MODE_0_2D | DISPLAY_BG0_ACTIVE |/* DISPLAY_BG1_ACTIVE |*/ DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
vramSetBankA(VRAM_A_MAIN_BG);
@@ -769,14 +769,14 @@ void displayMode16Bit() {
BG3_CR = BG_BMP16_512x256;
highBuffer = false;
-
+
BG3_XDX = isCpuScalerEnabled() ? 256 : (int) (1.25f * 256);
BG3_XDY = 0;
BG3_YDX = 0;
BG3_YDY = (int) ((200.0f / 192.0f) * 256);
memset(BG_GFX, 0, 512 * 256 * 2);
-
+
savedPalEntry255 = PALETTE_SUB[255];
PALETTE_SUB[255] = RGB15(31,31,31);//by default font will be rendered with color 255
@@ -795,11 +795,11 @@ void displayMode16Bit() {
consolePrintSet(0, 23);
consolePrintf("\n");
-
+
// Show keyboard
SUB_BG1_CR = BG_TILE_BASE(1) | BG_MAP_BASE(12);
//drawKeyboard(1, 12);
-
+
POWER_CR &= ~POWER_SWAP_LCDS;
displayModeIs8Bit = false;
@@ -816,10 +816,10 @@ void displayMode16BitFlipBuffer() {
#endif
if (!displayModeIs8Bit) {
u16* back = get16BitBackBuffer();
-
+
// highBuffer = !highBuffer;
// BG3_CR = BG_BMP16_512x256 | BG_BMP_RAM(highBuffer? 1: 0);
-
+
if (isCpuScalerEnabled())
{
Rescale_320x256x1555_To_256x256x1555(BG_GFX, back, 512, 512);
@@ -842,11 +842,11 @@ void displayMode16BitFlipBuffer() {
const u8* back = (const u8*)get8BitBackBuffer();
u16* base = BG_GFX + 0x10000;
Rescale_320x256xPAL8_To_256x256x1555( base,
- back,
+ back,
256,
512,
BG_PALETTE );
-
+
#ifdef SCALER_PROFILE
// 10 pixels : 1ms
u16 t1 = TIMER1_DATA;
@@ -899,10 +899,10 @@ void doSoundCallback() {
if (soundCallback) {
lastCallbackFrame = frameCount;
-
+
for (int r = IPC->playingSection; r < IPC->playingSection + 4; r++) {
int chunk = r & 3;
-
+
if (IPC->fillNeeded[chunk]) {
IPC->fillNeeded[chunk] = false;
DC_FlushAll();
@@ -910,9 +910,9 @@ void doSoundCallback() {
IPC->fillNeeded[chunk] = false;
DC_FlushAll();
}
-
+
}
-
+
}
#ifdef HEAVY_LOGGING
consolePrintf("done\n");
@@ -924,7 +924,7 @@ void doTimerCallback() {
if (callbackTimer <= 0) {
callbackTimer += callbackInterval;
callback(callbackInterval);
- }
+ }
}
}
@@ -933,15 +933,15 @@ void soundUpdate() {
// playSound(soundBuffer, (bufferSamples * 2), true);
}
// consolePrintf("%x\n", IPC->test);
-
-
+
+
if (bufferFrame == 0) {
// bufferFirstHalf = true;
- }
+ }
if (bufferFrame == bufferSize >> 1) {
//bufferSecondHalf = true;
- }
-
+ }
+
bufferFrame++;
if (bufferFrame == bufferSize) {
bufferFrame = 0;
@@ -954,20 +954,20 @@ void memoryReport() {
do {
p = (int *) malloc(r * 8192);
free(p);
- r++;
+ r++;
} while ((p) && (r < 512));
-
+
int t = -1;
void* block[1024];
do {
t++;
block[t] = (int *) malloc(4096);
- } while ((t < 1024) && (block[t]));
-
+ } while ((t < 1024) && (block[t]));
+
for (int q = 0; q < t; q++) {
free(block[q]);
}
-
+
consolePrintf("Free: %dK, Largest: %dK\n", t * 4, r * 8);
}
@@ -978,7 +978,7 @@ void addIndyFightingKeys() {
event.type = Common::EVENT_KEYDOWN;
event.kbd.flags = 0;
-
+
// consolePrintf("Fight keys\n");
if ((getKeysDown() & KEY_L)) {
@@ -1008,16 +1008,16 @@ void addIndyFightingKeys() {
event.kbd.keycode = Common::KEYCODE_6;
event.kbd.ascii = '6';
system->addEvent(event);
- }
+ }
if ((getKeysChanged() & KEY_DOWN)) {
event.type = getKeyEvent(KEY_DOWN);
event.kbd.keycode = Common::KEYCODE_2;
event.kbd.ascii = '2';
system->addEvent(event);
}
-
+
if (indyFightRight) {
-
+
if ((getKeysChanged() & KEY_X)) {
event.type = getKeyEvent(KEY_X);
event.kbd.keycode = Common::KEYCODE_9;
@@ -1035,7 +1035,7 @@ void addIndyFightingKeys() {
event.kbd.keycode = Common::KEYCODE_3;
event.kbd.ascii = '3';
system->addEvent(event);
- }
+ }
} else {
@@ -1056,18 +1056,18 @@ void addIndyFightingKeys() {
event.kbd.keycode = Common::KEYCODE_1;
event.kbd.ascii = '1';
system->addEvent(event);
- }
-
+ }
+
}
-
-
+
+
if ((getKeysChanged() & KEY_Y)) {
event.type = getKeyEvent(KEY_Y);
event.kbd.keycode = Common::KEYCODE_5;
event.kbd.ascii = '5';
system->addEvent(event);
}
-}
+}
void setKeyboardEnable(bool en) {
@@ -1079,8 +1079,8 @@ void setKeyboardEnable(bool en) {
DS::drawKeyboard(1, 15, backupBank);
-
-
+
+
SUB_BG1_CR = BG_TILE_BASE(1) | BG_MAP_BASE(15);
if (displayModeIs8Bit) {
@@ -1098,25 +1098,25 @@ void setKeyboardEnable(bool en) {
for (int r = 0; r < 256; r++) {
BG_PALETTE_SUB[r] = BG_PALETTE[r];
}
-
-
+
+
//restoreVRAM(1, 12, backupBank);
-
+
if (displayModeIs8Bit) {
// Copy the sub screen VRAM from the top screen - they should always be
// the same.
u16* buffer = get8BitBackBuffer();
-
+
for (int r = 0; r < (512 * 256) >> 1; r++)
BG_GFX_SUB[r] = buffer[r];
-
+
SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE; // Turn off keyboard layer
SUB_DISPLAY_CR |= DISPLAY_BG3_ACTIVE; // Turn on game layer
} else {
SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE; // Turn off keyboard layer
SUB_DISPLAY_CR |= DISPLAY_BG0_ACTIVE; // Turn on console layer
}
-
+
lcdSwap();
}
}
@@ -1136,7 +1136,7 @@ void addEventsToQueue() {
OSystem_DS* system = OSystem_DS::instance();
Common::Event event;
-
+
#ifdef USE_PROFILER
if (keysDown() & KEY_R) {
cygprofile_begin();
@@ -1148,7 +1148,7 @@ void addEventsToQueue() {
}
#endif
-
+
if (system->isEventQueueEmpty()) {
/*
@@ -1157,7 +1157,7 @@ void addEventsToQueue() {
consolePrintf("Tweak: %d\n", tweak);
IPC->tweakChanged = true;
}
-
+
if (getKeysDown() & KEY_R) {
tweak++;
@@ -1173,14 +1173,14 @@ void addEventsToQueue() {
if (!indyFightState) {
- if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_B)) {
+ if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_B)) {
if (currentGame->control == CONT_AGI) {
event.kbd.keycode = Common::KEYCODE_RETURN;
event.kbd.ascii = 13;
event.kbd.flags = 0;
} else {
- event.kbd.keycode = Common::KEYCODE_ESCAPE;
- event.kbd.ascii = 27;
+ event.kbd.keycode = Common::KEYCODE_ESCAPE;
+ event.kbd.ascii = 27;
event.kbd.flags = 0;
}
@@ -1190,11 +1190,11 @@ void addEventsToQueue() {
event.type = Common::EVENT_KEYUP;
system->addEvent(event);
}
-
+
}
-
-
-
+
+
+
if ((!getIndyFightState()) && (getKeysDown() & KEY_Y)) {
consoleEnable = !consoleEnable;
if (displayModeIs8Bit) {
@@ -1203,7 +1203,7 @@ void addEventsToQueue() {
displayMode16Bit();
}
}
-
+
if ((getKeyboardEnable())) {
event.kbd.flags = 0;
@@ -1211,30 +1211,30 @@ void addEventsToQueue() {
bool release = getKeysReleased() & (KEY_LEFT | KEY_RIGHT | KEY_UP | KEY_DOWN);
bool shoulders = getKeysHeld() & (KEY_L | KEY_R);
- if ( (down && (!shoulders)) || release)
+ if ( (down && (!shoulders)) || release)
{
-
+
if (getKeysChanged() & KEY_LEFT) {
event.kbd.keycode = Common::KEYCODE_LEFT;
event.kbd.ascii = 0;
event.type = getKeyEvent(KEY_LEFT);
system->addEvent(event);
}
-
+
if (getKeysChanged() & KEY_RIGHT) {
event.kbd.keycode = Common::KEYCODE_RIGHT;
event.kbd.ascii = 0;
event.type = getKeyEvent(KEY_RIGHT);
system->addEvent(event);
}
-
+
if (getKeysChanged() & KEY_UP) {
event.kbd.keycode = Common::KEYCODE_UP;
event.kbd.ascii = 0;
event.type = getKeyEvent(KEY_UP);
system->addEvent(event);
}
-
+
if (getKeysChanged() & KEY_DOWN) {
event.kbd.keycode = Common::KEYCODE_DOWN;
event.kbd.ascii = 0;
@@ -1242,15 +1242,15 @@ void addEventsToQueue() {
system->addEvent(event);
}
}
-
+
}
-
+
if (!((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) && (!getIndyFightState()) && (!getKeyboardEnable())) {
if ((getKeysDown() & KEY_A) && (!indyFightState)) {
gameScreenSwap = !gameScreenSwap;
}
-
+
if (!getPenHeld() || (mouseMode != MOUSE_HOVER)) {
if (getKeysDown() & KEY_LEFT) {
mouseMode = MOUSE_LEFT;
@@ -1264,7 +1264,7 @@ void addEventsToQueue() {
system->addEvent(event);
rightButtonDown = false;
}
-
+
if (getKeysDown() & KEY_RIGHT) {
if ((currentGame->control != CONT_SCUMM_SAMNMAX) && (currentGame->control != CONT_FUTURE_WARS) && (currentGame->control != CONT_GOBLINS)) {
@@ -1281,13 +1281,13 @@ void addEventsToQueue() {
} else {
event.mouse = Common::Point(getPenX(), getPenY());
}
-
+
rightButtonDown = true;
-
+
event.type = Common::EVENT_RBUTTONDOWN;
system->addEvent(event);
-
+
//event.type = Common::EVENT_RBUTTONUP;
//system->addEvent(event);
}
@@ -1299,9 +1299,9 @@ void addEventsToQueue() {
mouseMode = MOUSE_HOVER;
}
}
-
-
-
+
+
+
}
if ((getKeysDown() & KEY_SELECT)) {
@@ -1310,18 +1310,18 @@ void addEventsToQueue() {
showOptionsDialog();
}
-
+
}
-
+
if (!getIndyFightState() && !((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_X)) {
setKeyboardEnable(!keyboardEnable);
}
-
- updateStatus();
-
+
+ updateStatus();
+
Common::Event event;
-
+
if (!keyboardEnable) {
if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) {
@@ -1332,12 +1332,12 @@ void addEventsToQueue() {
}
if ((mouseMode != MOUSE_HOVER) || (!displayModeIs8Bit)) {
- if (getPenDown() && (!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) {
+ if (getPenDown() && (!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) {
event.type = ((mouseMode == MOUSE_LEFT) || (!displayModeIs8Bit))? Common::EVENT_LBUTTONDOWN: Common::EVENT_RBUTTONDOWN;
event.mouse = Common::Point(getPenX(), getPenY());
system->addEvent(event);
}
-
+
if (getPenReleased()) {
event.type = mouseMode == MOUSE_LEFT? Common::EVENT_LBUTTONUP: Common::EVENT_RBUTTONUP;
event.mouse = Common::Point(getPenX(), getPenY());
@@ -1345,7 +1345,7 @@ void addEventsToQueue() {
}
} else {
// In hover mode, D-pad left and right click the mouse when the pen is on the screen
-
+
if (getPenHeld()) {
if (getKeysDown() & KEY_LEFT) {
event.type = Common::EVENT_LBUTTONDOWN;
@@ -1357,7 +1357,7 @@ void addEventsToQueue() {
event.mouse = Common::Point(getPenX(), getPenY());
system->addEvent(event);
}*/
-
+
if (getKeysDown() & KEY_RIGHT) {
event.type = Common::EVENT_RBUTTONDOWN;
event.mouse = Common::Point(getPenX(), getPenY());
@@ -1370,11 +1370,11 @@ void addEventsToQueue() {
}*/
}
}
-
+
if (((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) || (indyFightState)) && (displayModeIs8Bit)) {
// Controls specific to the control method
-
-
+
+
if (currentGame->control == CONT_SKY) {
// Extra controls for Beneath a Steel Sky
if ((getKeysDown() & KEY_DOWN)) {
@@ -1387,7 +1387,7 @@ void addEventsToQueue() {
// Extra controls for Simon the Sorcerer
if ((getKeysDown() & KEY_DOWN)) {
Common::Event event;
-
+
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = Common::KEYCODE_F10; // F10 or # - show hotspots
event.kbd.ascii = Common::ASCII_F10;
@@ -1400,13 +1400,13 @@ void addEventsToQueue() {
}
}
-
-
+
+
if (currentGame->control == CONT_SCUMM_ORIGINAL) {
// Extra controls for Scumm v1-5 games
if ((getKeysDown() & KEY_DOWN)) {
Common::Event event;
-
+
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = Common::KEYCODE_PERIOD; // Full stop - skips current dialogue line
event.kbd.ascii = '.';
@@ -1416,19 +1416,19 @@ void addEventsToQueue() {
event.type = Common::EVENT_KEYUP;
system->addEvent(event);
}
-
+
if (indyFightState) {
addIndyFightingKeys();
}
-
+
}
-
+
}
}
-
+
if (!displayModeIs8Bit) {
// Front end controls
-
+
if (leftHandedSwap(getKeysChanged()) & KEY_UP) {
event.type = getKeyEvent(leftHandedSwap(KEY_UP));
event.kbd.keycode = Common::KEYCODE_UP;
@@ -1455,10 +1455,10 @@ void addEventsToQueue() {
event.type = Common::EVENT_KEYUP;
system->addEvent(event);
}
-
+
}
-
+
if ((getKeysChanged() & KEY_START)) {
event.type = getKeyEvent(KEY_START);
if (currentGame->control == CONT_FUTURE_WARS) {
@@ -1481,34 +1481,34 @@ void addEventsToQueue() {
system->addEvent(event);
}
-
+
if (keyboardEnable) {
DS::addKeyboardEvents();
}
-
+
consumeKeys();
-
+
consumePenEvents();
}
}
-
+
void triggerIcon(int imageNum) {
triggeredIcon = imageNum;
- triggeredIconTimeout = 120;
+ triggeredIconTimeout = 120;
}
-
+
void setIcon(int num, int x, int y, int imageNum, int flags, bool enable) {
- sprites[num].attribute[0] = ATTR0_BMP | (enable? y: 192) | (!enable? ATTR0_DISABLED: 0);
+ sprites[num].attribute[0] = ATTR0_BMP | (enable? y: 192) | (!enable? ATTR0_DISABLED: 0);
sprites[num].attribute[1] = ATTR1_SIZE_32 | x | flags;
sprites[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16);
}
void setIconMain(int num, int x, int y, int imageNum, int flags, bool enable) {
- spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable? ATTR0_DISABLED: 0);
+ spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable? ATTR0_DISABLED: 0);
spritesMain[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags;
spritesMain[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16);
}
@@ -1536,16 +1536,16 @@ void updateStatus() {
break;
}
}
-
+
setIcon(0, 208, 150, offs, 0, true);
-
+
if (indyFightState) {
setIcon(1, (190 - 32), 150, 3, (indyFightRight? 0: ATTR1_FLIP_X), true);
// consolePrintf("%d\n", indyFightRight);
} else {
// setIcon(1, 0, 0, 0, 0, false);
}
-
+
if (triggeredIconTimeout > 0) {
triggeredIconTimeout--;
setIcon(4, 16, 150, triggeredIcon, 0, true);
@@ -1584,7 +1584,7 @@ void soundBufferEmptyHandler() {
} else {
// bufferFirstHalf = true;
}
-
+
soundHiPart = !soundHiPart;
}
@@ -1595,7 +1595,7 @@ void setMainScreenScroll(int x, int y) {
} else {
BG3_CX = x + (((frameCount & 1) == 0)? 64: 0);
BG3_CY = y;
-
+
touchX = x >> 8;
touchY = y >> 8;
}
@@ -1616,13 +1616,13 @@ void setMainScreenScale(int x, int y) {
BG3_YDY = y;
}
else
- {
+ {
BG3_XDX = x;
BG3_XDY = 0;
BG3_YDX = 0;
BG3_YDY = y;
}
-
+
touchScX = x;
touchScY = y;
}
@@ -1632,7 +1632,7 @@ void setZoomedScreenScroll(int x, int y, bool shake) {
if (gameScreenSwap) {
BG3_CX = x + ((shake && ((frameCount & 1) == 0))? 64: 0);
BG3_CY = y;
-
+
touchX = x >> 8;
touchY = y >> 8;
} else {
@@ -1684,7 +1684,7 @@ void VBlankHandler(void) {
soundUpdate();
-
+
if ((!gameScreenSwap) && (!(getKeysHeld() & KEY_L) && !(getKeysHeld() & KEY_R))) {
if (currentGame) {
@@ -1699,14 +1699,14 @@ void VBlankHandler(void) {
}
}
}
-
+
penUpdate();
keysUpdate();
frameCount++;
-
+
if ((cursorEnable) && (mouseCursorVisible))
{
if (!keyboardEnable) {
@@ -1725,31 +1725,31 @@ void VBlankHandler(void) {
if (callback) {
callbackTimer -= FRAME_TIME;
}
-
+
if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) {
-
+
if ((!dragging) && (getPenHeld()) && (penDownFrames > 5)) {
dragging = true;
dragStartX = penX;
dragStartY = penY;
-
+
if (gameScreenSwap) {
dragScX = subScTargetX;
dragScY = subScTargetY;
} else {
dragScX = scX;
- dragScY = scY;
- }
-
-
+ dragScY = scY;
+ }
+
+
}
-
+
if ((dragging) && (!getPenHeld())) {
dragging = false;
}
-
+
if (dragging) {
-
+
if (gameScreenSwap) {
subScTargetX = dragScX + ((dragStartX - penX) << 8);
subScTargetY = dragScY + ((dragStartY - penY) << 8);
@@ -1757,18 +1757,18 @@ void VBlankHandler(void) {
scX = dragScX + ((dragStartX - penX));
scY = dragScY + ((dragStartY - penY));
}
-
+
// consolePrintf("X:%d Y:%d\n", dragStartX - penX, dragStartY - penY);
}
- }
-
-
+ }
+
+
/* if ((frameCount & 1) == 0) {
SUB_BG3_CX = subScX;
} else {
SUB_BG3_CX = subScX + 64;
}
-
+
SUB_BG3_CY = subScY + (shakePos << 8);*/
/*SUB_BG3_XDX = (int) (subScreenWidth / 256.0f * 256);
@@ -1777,33 +1777,33 @@ void VBlankHandler(void) {
SUB_BG3_YDY = (int) (subScreenHeight / 192.0f * 256);*/
static int ratio = ( 320 << 8) / SCUMM_GAME_WIDTH;
-
+
bool zooming = false;
-
+
if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) {
if ((getKeysHeld() & KEY_A) && (subScreenScale < ratio)) {
subScreenScale += 1;
zooming = true;
}
-
+
if ((getKeysHeld() & KEY_B) && (subScreenScale > 128)) {
subScreenScale -=1;
zooming = true;
}
}
-
+
int xCenter = subScTargetX + ((subScreenWidth >> 1) << 8);
int yCenter = subScTargetY + ((subScreenHeight >> 1) << 8);
-
+
if (twoHundredPercentFixedScale) {
subScreenWidth = 256 >> 1;
subScreenHeight = 192 >> 1;
} else {
subScreenWidth = (((SCUMM_GAME_HEIGHT * 256) / 192) * subScreenScale) >> 8;
subScreenHeight = SCUMM_GAME_HEIGHT * subScreenScale >> 8;
-
+
if ( ((subScreenWidth) > 256 - 8) && ((subScreenWidth) < 256 + 8) ) {
subScreenWidth = 256;
subScreenHeight = 192;
@@ -1832,13 +1832,13 @@ void VBlankHandler(void) {
//triggerIcon(-1);
}
}
-
+
subScTargetX = xCenter - ((subScreenWidth >> 1) << 8);
subScTargetY = yCenter - ((subScreenHeight >> 1) << 8);
-
-
+
+
if (subScTargetX < 0) subScTargetX = 0;
if (subScTargetX > (gameWidth - subScreenWidth) << 8) subScTargetX = (gameWidth - subScreenWidth) << 8;
@@ -1850,30 +1850,30 @@ void VBlankHandler(void) {
subScX += (subScTargetX - subScX) >> 2;
subScY += (subScTargetY - subScY) >> 2;
-
+
if (displayModeIs8Bit) {
-
+
if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) {
-
+
int offsX = 0, offsY = 0;
if (getKeysHeld() & KEY_LEFT) {
offsX -= 1;
}
-
+
if (getKeysHeld() & KEY_RIGHT) {
offsX += 1;
}
-
+
if (getKeysHeld() & KEY_UP) {
offsY -= 1;
}
-
+
if (getKeysHeld() & KEY_DOWN) {
offsY += 1;
}
-
+
if (((gameScreenSwap) && (getKeysHeld() & KEY_L)) || ((!gameScreenSwap) && (getKeysHeld() & KEY_R))) {
subScTargetX += offsX << 8;
subScTargetY += offsY << 8;
@@ -1884,32 +1884,32 @@ void VBlankHandler(void) {
}
if (!scaledMode) {
-
+
if (scX + 256 > gameWidth - 1) {
scX = gameWidth - 1 - 256;
}
-
+
if (scX < 0) {
scX = 0;
}
-
+
if (scY + 192 > gameHeight - 1) {
scY = gameHeight - 1 - 192;
}
-
+
if (scY < 0) {
scY = 0;
}
-
+
setZoomedScreenScroll(subScX, subScY, (subScreenWidth != 256) && (subScreenWidth != 128));
setZoomedScreenScale(subScreenWidth, ((subScreenHeight * (256 << 8)) / 192) >> 8);
-
-
+
+
setMainScreenScroll(scX << 8, (scY << 8) + (shakePos << 8));
setMainScreenScale(256, 256); // 1:1 scale
-
+
} else {
-
+
if (scY > gameHeight - 192 - 1) {
scY = gameHeight - 192 - 1;
}
@@ -1917,13 +1917,13 @@ void VBlankHandler(void) {
if (scY < 0) {
scY = 0;
}
-
+
setZoomedScreenScroll(subScX, subScY, (subScreenWidth != 256) && (subScreenWidth != 128));
setZoomedScreenScale(subScreenWidth, ((subScreenHeight * (256 << 8)) / 192) >> 8);
-
+
setMainScreenScroll(64, (scY << 8) + (shakePos << 8));
setMainScreenScale(320, 256); // 1:1 scale
-
+
}
} else {
setZoomedScreenScroll(0, 0, true);
@@ -1932,12 +1932,12 @@ void VBlankHandler(void) {
setMainScreenScroll(0, 0);
setMainScreenScale(320, 256); // 1:1 scale
}
-
+
// Enable on screen keyboard when pen taps icon
if ((keyboardIcon) && (penX < 32) && (penY > 160) && (penHeld)) {
setKeyboardEnable(true);
}
-
+
if (keyboardEnable) {
if (DS::getKeyboardClosed()) {
setKeyboardEnable(false);
@@ -1987,7 +1987,7 @@ void setTopScreenTarget(int x, int y) {
if (subScTargetY < 0) subScTargetY = 0;
if (subScTargetY > gameHeight - subScreenHeight) subScTargetY = gameHeight - subScreenHeight;
-
+
subScTargetX <<=8;
subScTargetY <<=8;
}
@@ -2008,12 +2008,12 @@ void initHardware() {
penInit();
powerON(POWER_ALL);
-/* vramSetBankA(VRAM_A_MAIN_BG);
- vramSetBankB(VRAM_B_MAIN_BG);
+/* vramSetBankA(VRAM_A_MAIN_BG);
+ vramSetBankB(VRAM_B_MAIN_BG);
vramSetBankC(VRAM_C_SUB_BG); */
- vramSetBankI(VRAM_I_SUB_SPRITE);
- vramSetBankE(VRAM_E_MAIN_SPRITE);
-
+ vramSetBankI(VRAM_I_SUB_SPRITE);
+ vramSetBankE(VRAM_E_MAIN_SPRITE);
+
currentTimeMillis = 0;
@@ -2041,8 +2041,8 @@ void initHardware() {
// Allocate save buffer for game screen
// savedBuffer = new u8[320 * 200];
displayMode16Bit();
-
- memset(BG_GFX, 0, 512 * 256 * 2);
+
+ memset(BG_GFX, 0, 512 * 256 * 2);
scaledMode = true;
scX = 0;
scY = 0;
@@ -2050,33 +2050,33 @@ void initHardware() {
subScY = 0;
subScTargetX = 0;
subScTargetY = 0;
-
+
//lcdSwap();
POWER_CR &= ~POWER_SWAP_LCDS;
-
+
frameCount = 0;
callback = NULL;
-
-// vramSetBankH(VRAM_H_SUB_BG);
-
+
+// vramSetBankH(VRAM_H_SUB_BG);
+
// // Do text stuff
//BG0_CR = BG_MAP_BASE(0) | BG_TILE_BASE(1);
// BG0_Y0 = 48;
-
+
PALETTE[255] = RGB15(31,31,31);//by default font will be rendered with color 255
-
+
//consoleInit() is a lot more flexible but this gets you up and running quick
// consoleInitDefault((u16*)SCREEN_BASE_BLOCK(0), (u16*)CHAR_BASE_BLOCK(1), 16);
//consolePrintSet(0, 6);
-
+
//irqs are nice
irqInit();
// irqInitHandler();
irqSet(IRQ_VBLANK, VBlankHandler);
irqSet(IRQ_TIMER0, timerTickHandler);
irqSet(IRQ_TIMER2, soundBufferEmptyHandler);
-
+
irqEnable(IRQ_VBLANK);
irqEnable(IRQ_TIMER0);
irqEnable(IRQ_TIMER2);
@@ -2085,15 +2085,15 @@ void initHardware() {
irqSet(IRQ_HBLANK, hBlankHandler);
irqEnable(IRQ_HBLANK);
#endif
-
-
+
+
// Set up a millisecond timer
#ifdef HEAVY_LOGGING
consolePrintf("Setting up timer...");
#endif
TIMER0_CR = 0;
TIMER0_DATA = (u32) TIMER_FREQ(1000);
- TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1 | TIMER_IRQ_REQ;
+ TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1 | TIMER_IRQ_REQ;
REG_IME = 1;
#ifdef HEAVY_LOGGING
consolePrintf("done\n");
@@ -2102,9 +2102,9 @@ void initHardware() {
PALETTE[255] = RGB15(0,0,31);
initSprites();
-
+
// videoSetModeSub(MODE_3_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
-
+
// Convert texture from 24bit 888 to 16bit 1555, remembering to set top bit!
u8* srcTex = (u8 *) icons_raw;
for (int r = 32 * 256 ; r >= 0; r--) {
@@ -2112,7 +2112,7 @@ void initHardware() {
SPRITE_GFX[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10);
}
-
+
@@ -2199,27 +2199,27 @@ void penUpdate() {
penDownLastFrame = false;
penDownFrames = 0;
}
-
+
}
int leftHandedSwap(int keys) {
// Start and select are unchanged
if (leftHandedMode) {
int result = keys & (~(KEY_R | KEY_L | KEY_Y | KEY_A | KEY_B | KEY_X | KEY_LEFT | KEY_RIGHT | KEY_UP | KEY_DOWN));
-
+
if (keys & KEY_L) result |= KEY_R;
if (keys & KEY_R) result |= KEY_L;
-
+
if (keys & KEY_LEFT) result |= KEY_Y;
if (keys & KEY_RIGHT) result |= KEY_A;
if (keys & KEY_DOWN) result |= KEY_B;
if (keys & KEY_UP) result |= KEY_X;
-
+
if (keys & KEY_Y) result |= KEY_LEFT;
if (keys & KEY_A) result |= KEY_RIGHT;
if (keys & KEY_B) result |= KEY_DOWN;
if (keys & KEY_X) result |= KEY_UP;
-
+
return result;
} else {
return keys;
@@ -2310,28 +2310,28 @@ int getPenY() {
GLvector getPenPos() {
GLvector v;
-
+
v.x = (penX * inttof32(1)) / SCREEN_WIDTH;
v.y = (penY * inttof32(1)) / SCREEN_HEIGHT;
-
+
return v;
}
void formatSramOption() {
consolePrintf("The following files are present in save RAM:\n");
DSSaveFileManager::instance()->listFiles();
-
+
consolePrintf("\nAre you sure you want to\n");
consolePrintf("DELETE all files?\n");
consolePrintf("A = Yes, X = No\n");
-
+
while (true) {
if (keysHeld() & KEY_A) {
DSSaveFileManager::instance()->formatSram();
consolePrintf("SRAM cleared!\n");
return;
}
-
+
if (keysHeld() & KEY_X) {
consolePrintf("Whew, that was close!\n");
return;
@@ -2380,7 +2380,7 @@ void fastRamReset() {
bool GBAMPAvail = false;
-bool initGBAMP(int mode) {
+bool initGBAMP(int mode) {
if (FAT_InitFiles()) {
if (mode == 2) {
disc_IsInserted();
@@ -2405,14 +2405,14 @@ void initDebugger() {
set_verbosity(VERBOSE_INFO | VERBOSE_ERROR);
wireless_init(0);
wireless_connect();
-
+
// This is where the address of the computer running the Java
// stub goes.
debugger_connect_tcp(192, 168, 0, 1);
- debugger_init();
-
+ debugger_init();
+
// Update function - should really call every frame
- user_debugger_update();
+ user_debugger_update();
}
@@ -2447,7 +2447,7 @@ cardTranslate cardReaderTable[] = {
void reboot() {
int deviceType = -1;
-
+
if (disc_getDeviceId() == DEVICE_DLDI) {
char id[6];
@@ -2525,13 +2525,13 @@ int main(void)
initDebugger();
}
#endif
-
+
// Let arm9 read cartridge
*((u16 *) (0x04000204)) &= ~0x0080;
-
+
lastCallbackFrame = 0;
tweak = 0;
-
+
indyFightState = false;
indyFightRight = true;
@@ -2544,25 +2544,25 @@ int main(void)
// bufferSize = 10;
-
+
/*bufferRate = 44100;
bufferFrame = 0;
bufferSamples = 8192;
bufferFirstHalf = false;
bufferSecondHalf = true;
-
+
int bytes = (2 * (bufferSamples)) + 100;
-
+
soundBuffer = (s16 *) malloc(bytes * 2);
soundHiPart = true;
-
+
for (int r = 0; r < bytes; r++) {
soundBuffer[r] = 0;
}
-
+
swiWaitForVBlank();
swiWaitForVBlank();
@@ -2571,29 +2571,29 @@ int main(void)
swiWaitForVBlank();
swiWaitForVBlank();
*/
-
+
lastEventFrame = 0;
mouseMode = MOUSE_LEFT;
-
+
/*
TIMER1_CR = 0;
TIMER1_DATA = TIMER_FREQ(bufferRate);
TIMER1_CR = TIMER_ENABLE | TIMER_DIV_1;
-
+
TIMER2_CR = 0;
TIMER2_DATA = 0xFFFF - (bufferSamples / 2);
TIMER2_CR = TIMER_ENABLE | TIMER_IRQ_REQ | TIMER_CASCADE;
*/
// 2945 - 2947
-
-
+
+
// for (int r = 2946; r < 3000; r++) {
// soundBuffer[r] = 30000;
// }
-
+
//2372
consolePrintf("-------------------------------\n");
@@ -2649,7 +2649,7 @@ int main(void)
consolePrintf("\n");
#endif
-
+
#ifdef USE_BUILT_IN_DRIVER_SELECTION
// Do M3 detection selectioon
int extraData = DSSaveFileManager::getExtraData();
@@ -2688,7 +2688,7 @@ int main(void)
disc_setEnable(mode);
DSSaveFileManager::setExtraData(mode);
#else
-
+
int mode = 0;
#endif
@@ -2734,11 +2734,11 @@ int main(void)
}
delete node;
-
+
updateStatus();
-
-
+
+
// OSystem_DS::instance();
g_system = new OSystem_DS();
@@ -2769,7 +2769,7 @@ int main(void)
char* argv[3] = {"/scummvmds", "--config=scummvmg.ini"};
#endif
-#ifdef DS_NON_SCUMM_BUILD
+#ifdef DS_NON_SCUMM_BUILD
while (1) {
scummvm_main(2, (char **) &argv);
diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h
index 314ec97a44..04be57f2eb 100644
--- a/backends/platform/ds/arm9/source/dsmain.h
+++ b/backends/platform/ds/arm9/source/dsmain.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _DSMAIN_H
#define _DSMAIN_H
diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp
index 07fd121f05..d23201f745 100644
--- a/backends/platform/ds/arm9/source/dsoptions.cpp
+++ b/backends/platform/ds/arm9/source/dsoptions.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#include "dsoptions.h"
#include "dsmain.h"
#include "gui/dialog.h"
@@ -42,7 +42,7 @@ namespace DS {
DSOptionsDialog::DSOptionsDialog() : GUI::Dialog(20, 0, 320 - 40, 230 - 20) {
addButton(this, 10, 175, "Close", GUI::kCloseCmd, 'C');
-
+
#ifdef DS_SCUMM_BUILD
if (!DS::isGBAMPAvailable()) {
// addButton(this, 100, 140, "Delete Save", 'dels', 'D');
@@ -152,7 +152,7 @@ DSOptionsDialog::DSOptionsDialog() : GUI::Dialog(20, 0, 320 - 40, 230 - 20) {
} else {
_touchY->setValue(0);
}
-
+
}
DSOptionsDialog::~DSOptionsDialog() {
@@ -186,7 +186,7 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint
/* if (cmd == 'dels') {
_delDialog->setList(Scumm::generateSavegameList(Scumm::g_scumm, false));
_delDialog->handleCommand(NULL, GUI::kListSelectionChangedCmd, 0);
-
+
Common::Event event;
event.type = Common::EVENT_KEYDOWN;
event.kbd.ascii = 0;
@@ -195,9 +195,9 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint
event.type = Common::EVENT_KEYUP;
OSystem_DS::instance()->addEvent(event);
-
+
int idx = _delDialog->runModal();
-
+
if (idx >= 0) {
char name[256];
Scumm::g_scumm->makeSavegameName(name, idx, false);
@@ -205,10 +205,10 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint
((DSSaveFileManager *) (OSystem_DS::instance()->getSavefileManager()))->deleteFile(name);
}
}
-
+
}*/
#endif
-
+
}
@@ -220,11 +220,11 @@ void togglePause() {
OSystem_DS* system = OSystem_DS::instance();
event.type = Common::EVENT_KEYDOWN;
- event.kbd.keycode = Common::KEYCODE_p;
+ event.kbd.keycode = Common::KEYCODE_p;
event.kbd.ascii = 'p';
event.kbd.flags = 0;
system->addEvent(event);
-
+
event.type = Common::EVENT_KEYUP;
system->addEvent(event);
}
@@ -235,13 +235,13 @@ void showOptionsDialog() {
togglePause();
DS::displayMode16Bit();
-
+
DSOptionsDialog* d = new DSOptionsDialog();
d->runModal();
consolePrintf("deleting dialog\n");
delete d;
-
+
consolePrintf("going to 8 bit\n");
DS::displayMode8Bit();
@@ -303,7 +303,7 @@ void setOptions() {
} else {
DS::setCpuScalerEnable(false);
}
-#endif
+#endif
}
}
diff --git a/backends/platform/ds/arm9/source/dsoptions.h b/backends/platform/ds/arm9/source/dsoptions.h
index 9a345feb3b..3c9da82a83 100644
--- a/backends/platform/ds/arm9/source/dsoptions.h
+++ b/backends/platform/ds/arm9/source/dsoptions.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _DSOPTIONS_H_
#define _DSOPTIONS_H_
@@ -39,7 +39,7 @@ class DSOptionsDialog : public GUI::Dialog {
public:
DSOptionsDialog();
~DSOptionsDialog();
-
+
protected:
virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data);
void togglePause();
@@ -56,7 +56,7 @@ protected:
GUI::CheckboxWidget* _cpuScaler;
GUI::CheckboxWidget* _showCursorCheckbox;
GUI::CheckboxWidget* _snapToBorderCheckbox;
-
+
#ifdef DS_SCUMM_BUILD
Scumm::SaveLoadChooser* _delDialog;
#endif
diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c
index 4128c769e1..f456343a2c 100644
--- a/backends/platform/ds/arm9/source/fat/disc_io.c
+++ b/backends/platform/ds/arm9/source/fat/disc_io.c
@@ -5,7 +5,7 @@
uniformed io-interface to work with Chishm's FAT library
Written by MightyMax
-
+
Modified by Chishm:
2005-11-06
* Added WAIT_CR modifications for NDS
@@ -87,7 +87,7 @@ LPIO_INTERFACE active_interface = 0;
Disc Cache functions
2006-02-03:
- Added by www.neoflash.com
+ Added by www.neoflash.com
*/
int discDetect = 0;
@@ -99,7 +99,7 @@ int dldiFound = FALSE;
#include <string.h>
#define CACHE_FREE 0xFFFFFFFF
-
+
static u8 cacheBuffer[ DISC_CACHE_COUNT * 512 ];
static struct {
@@ -112,20 +112,20 @@ FATDevice currentDevice;
static u32 disc_CacheFind(u32 sector) {
u32 i;
-
+
for( i = 0; i < DISC_CACHE_COUNT; i++ ) {
if( cache[ i ].sector == sector )
return i;
}
-
+
return CACHE_FREE;
}
static u32 disc_CacheFindFree(void) {
-
+
u32 i = 0, j;
u32 count = -1;
-
+
for( j = 0; j < DISC_CACHE_COUNT; j++ ) {
if( cache[ j ].sector == CACHE_FREE ) {
@@ -142,7 +142,7 @@ static u32 disc_CacheFindFree(void) {
if( cache[ i ].sector != CACHE_FREE && cache[i].dirty != 0 ) {
active_interface->fn_WriteSectors( cache[ i ].sector, 1, &cacheBuffer[ i * 512 ] );
- /* todo: handle write error here
+ /* todo: handle write error here
cache[ i ].sector = CACHE_FREE;
cache[ i ].dirty = 0;
@@ -431,7 +431,7 @@ bool disc_setDsSlotInterface (void)
#endif
-bool disc_Init(void)
+bool disc_Init(void)
{
#ifdef DISC_CACHE
disc_CacheInit();
@@ -455,15 +455,15 @@ bool disc_Init(void)
// could not find a working IO Interface
active_interface = 0 ;
return false ;
-}
+}
-bool disc_IsInserted(void)
+bool disc_IsInserted(void)
{
if (active_interface) return active_interface->fn_IsInserted() ;
return false ;
-}
+}
-bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer)
+bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer)
{
#ifdef DISC_CACHE
u8 *p=(u8*)buffer;
@@ -480,9 +480,9 @@ bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer)
if (active_interface) return active_interface->fn_ReadSectors(sector,numSecs,buffer) ;
return false ;
#endif
-}
+}
-bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer)
+bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer)
{
/*#ifdef DISC_CACHE
u8 *p=(u8*)buffer;
@@ -502,15 +502,15 @@ bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer)
if (active_interface) return active_interface->fn_WriteSectors(sector,numSecs,buffer) ;
return false ;
//#endif
-}
+}
-bool disc_ClearStatus(void)
+bool disc_ClearStatus(void)
{
if (active_interface) return active_interface->fn_ClearStatus() ;
return false ;
-}
+}
-bool disc_Shutdown(void)
+bool disc_Shutdown(void)
{
#ifdef DISC_CACHE
disc_CacheFlush();
@@ -518,7 +518,7 @@ bool disc_Shutdown(void)
if (active_interface) active_interface->fn_Shutdown() ;
active_interface = 0 ;
return true ;
-}
+}
u32 disc_HostType (void)
{
diff --git a/backends/platform/ds/arm9/source/fat/disc_io.h b/backends/platform/ds/arm9/source/fat/disc_io.h
index 05d4c020bd..b2317ca110 100644
--- a/backends/platform/ds/arm9/source/fat/disc_io.h
+++ b/backends/platform/ds/arm9/source/fat/disc_io.h
@@ -7,7 +7,7 @@
// Use DMA to read the card, remove this line to use normal reads/writes
// #define _CF_USE_DMA
-// Allow buffers not aligned to 16 bits when reading files.
+// Allow buffers not aligned to 16 bits when reading files.
// Note that this will slow down access speed, so only use if you have to.
// It is also incompatible with DMA
#define _CF_ALLOW_UNALIGNED
@@ -43,7 +43,7 @@
// This allows the code to build on an earlier version of libnds, before the register was renamed
#ifndef REG_EXMEMCNT
-#define REG_EXMEMCNT REG_EXEMEMCNT
+#define REG_EXMEMCNT REG_EXEMEMCNT
#endif
#ifndef REG_EXEMEMCNT
@@ -70,7 +70,7 @@
#endif
// Disable NDS specific hardware and features if running on a GBA
-#ifndef NDS
+#ifndef NDS
#undef SUPPORT_NMMC
#undef DISC_CACHE
#endif
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 b5fdd665df..9594066f03 100644
--- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
+++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c
@@ -42,7 +42,7 @@
//---------------------------------------------------------------
// Appropriate placement of CF functions and data
#ifdef NDS
- #define _VARS_IN_RAM
+ #define _VARS_IN_RAM
#else
#define _VARS_IN_RAM __attribute__ ((section (".sbss")))
#endif
@@ -74,7 +74,7 @@
#ifdef __GNUC__
#define __PACKED __attribute__ ((__packed__))
#else
- #define __PACKED
+ #define __PACKED
#pragma pack(1)
#endif
@@ -98,7 +98,7 @@ typedef struct
u32 numSectors;
union // Different types of extended BIOS Parameter Block for FAT16 and FAT32
{
- struct
+ struct
{
// Ext BIOS Parameter Block for FAT16
u8 driveNumber;
@@ -110,7 +110,7 @@ typedef struct
// Bootcode
u8 bootCode[448];
} __PACKED fat16;
- struct
+ struct
{
// FAT32 extended block
u32 sectorsPerFAT32;
@@ -158,7 +158,7 @@ typedef struct
typedef struct
{
u8 ordinal; // Position within LFN
- u16 char0;
+ u16 char0;
u16 char1;
u16 char2;
u16 char3;
@@ -177,7 +177,7 @@ typedef struct
u16 char12;
} __PACKED DIR_ENT_LFN;
-const char lfn_offset_table[13]={0x01,0x03,0x05,0x07,0x09,0x0E,0x10,0x12,0x14,0x16,0x18,0x1C,0x1E};
+const char lfn_offset_table[13]={0x01,0x03,0x05,0x07,0x09,0x0E,0x10,0x12,0x14,0x16,0x18,0x1C,0x1E};
// End of packed structs
#ifdef __PACKED
@@ -190,7 +190,7 @@ const char lfn_offset_table[13]={0x01,0x03,0x05,0x07,0x09,0x0E,0x10,0x12,0x14,0x
//-----------------------------------------------------------------
// Global Variables
-// _VARS_IN_RAM variables are stored in the largest section of WRAM
+// _VARS_IN_RAM variables are stored in the largest section of WRAM
// available: IWRAM on NDS ARM7, EWRAM on NDS ARM9 and GBA
// Files
@@ -305,7 +305,7 @@ u16 getRTCtoFileTime (void)
u16 getRTCtoFileDate (void)
{
#ifdef NDS
- return (
+ return (
( ((IPC->rtc_year + 20) & 0x7F) <<9) |
( (IPC->rtc_month & 0xF) << 5) |
(IPC->rtc_day & 0x1F) );
@@ -330,13 +330,13 @@ u32 FAT_NextCluster(u32 cluster)
u32 nextCluster = CLUSTER_FREE;
u32 sector;
int offset;
-
- switch (filesysType)
+
+ switch (filesysType)
{
case FS_UNKNOWN:
nextCluster = CLUSTER_FREE;
break;
-
+
case FS_FAT12:
sector = filesysFAT + (((cluster * 3) / 2) / BYTE_PER_READ);
offset = ((cluster * 3) / 2) % BYTE_PER_READ;
@@ -351,32 +351,32 @@ u32 FAT_NextCluster(u32 cluster)
nextCluster = ((u8*)fatBuffer)[offset];
offset++;
-
+
if (offset >= BYTE_PER_READ) {
offset = 0;
fatBufferCurSector++;
disc_ReadSector(fatBufferCurSector, fatBuffer);
}
-
+
nextCluster |= (((u8*)fatBuffer)[offset]) << 8;
-
+
if (cluster & 0x01) {
nextCluster = nextCluster >> 4;
} else {
nextCluster &= 0x0FFF;
}
-
+
if (nextCluster >= 0x0FF7)
{
nextCluster = CLUSTER_EOF;
}
break;
-
+
case FS_FAT16:
sector = filesysFAT + ((cluster << 1) / BYTE_PER_READ);
offset = cluster % (BYTE_PER_READ >> 1);
-
+
// If FAT buffer contains wrong sector
if (sector != fatBufferCurSector)
{
@@ -387,17 +387,17 @@ u32 FAT_NextCluster(u32 cluster)
// read the nextCluster value
nextCluster = ((u16*)fatBuffer)[offset];
-
+
if (nextCluster >= 0xFFF7)
{
nextCluster = CLUSTER_EOF;
}
break;
-
+
case FS_FAT32:
sector = filesysFAT + ((cluster << 2) / BYTE_PER_READ);
offset = cluster % (BYTE_PER_READ >> 2);
-
+
// If FAT buffer contains wrong sector
if (sector != fatBufferCurSector)
{
@@ -408,18 +408,18 @@ u32 FAT_NextCluster(u32 cluster)
// read the nextCluster value
nextCluster = (((u32*)fatBuffer)[offset]) & 0x0FFFFFFF;
-
+
if (nextCluster >= 0x0FFFFFF7)
{
nextCluster = CLUSTER_EOF;
}
break;
-
+
default:
nextCluster = CLUSTER_FREE;
break;
}
-
+
return nextCluster;
}
@@ -437,13 +437,13 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value)
{
return false;
}
-
- switch (filesysType)
+
+ switch (filesysType)
{
case FS_UNKNOWN:
return false;
break;
-
+
case FS_FAT12:
sector = filesysFAT + (((cluster * 3) / 2) / BYTE_PER_READ);
offset = ((cluster * 3) / 2) % BYTE_PER_READ;
@@ -465,32 +465,32 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value)
offset = 0;
// write the buffer back to disc
disc_WriteSector(fatBufferCurSector, fatBuffer);
- // read the next sector
+ // read the next sector
fatBufferCurSector++;
disc_ReadSector(fatBufferCurSector, fatBuffer);
}
-
+
((u8*)fatBuffer)[offset] = (value & 0x0FF0) >> 4;
} else {
-
+
((u8*)fatBuffer)[offset] = value & 0xFF;
-
+
offset++;
if (offset >= BYTE_PER_READ) {
offset = 0;
// write the buffer back to disc
disc_WriteSector(fatBufferCurSector, fatBuffer);
- // read the next sector
+ // read the next sector
fatBufferCurSector++;
disc_ReadSector(fatBufferCurSector, fatBuffer);
}
-
+
((u8*)fatBuffer)[offset] = (((u8*)fatBuffer)[offset] & 0xF0) | ((value >> 8) & 0x0F);
}
break;
-
+
case FS_FAT16:
sector = filesysFAT + ((cluster << 1) / BYTE_PER_READ);
offset = cluster % (BYTE_PER_READ >> 1);
@@ -507,11 +507,11 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value)
((u16*)fatBuffer)[offset] = (value & 0xFFFF);
break;
-
+
case FS_FAT32:
sector = filesysFAT + ((cluster << 2) / BYTE_PER_READ);
offset = cluster % (BYTE_PER_READ >> 2);
-
+
// If FAT buffer contains wrong sector
if (sector != fatBufferCurSector)
{
@@ -524,15 +524,15 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value)
(((u32*)fatBuffer)[offset]) = value;
break;
-
+
default:
return false;
break;
}
-
+
// write the buffer back to disc
disc_WriteSector(fatBufferCurSector, fatBuffer);
-
+
return true;
}
#endif
@@ -540,8 +540,8 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value)
#ifdef CAN_WRITE_TO_DISC
/*-----------------------------------------------------------------
FAT_ReadWriteFatEntryBuffered
-Internal function - writes FAT information about a cluster to a
- buffer that should then be flushed to disc using
+Internal function - writes FAT information about a cluster to a
+ buffer that should then be flushed to disc using
FAT_WriteFatEntryFlushBuffer()
Call FAT_WriteFatEntry first so as not to ruin the disc.
Also returns the entry being replaced
@@ -555,13 +555,13 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value)
if ((cluster < 0x0002) || (cluster > fatLastCluster))
return CLUSTER_FREE;
-
- switch (filesysType)
+
+ switch (filesysType)
{
case FS_UNKNOWN:
oldValue = CLUSTER_FREE;
break;
-
+
case FS_FAT12:
sector = filesysFAT + (((cluster * 3) / 2) / BYTE_PER_READ);
offset = ((cluster * 3) / 2) % BYTE_PER_READ;
@@ -587,40 +587,40 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value)
offset = 0;
// write the buffer back to disc
disc_WriteSector(fatBufferCurSector, fatBuffer);
- // read the next sector
+ // read the next sector
fatBufferCurSector++;
disc_ReadSector(fatBufferCurSector, fatBuffer);
}
-
+
oldValue |= ((((u8*)fatBuffer)[offset]) << 4) & 0x0FF0;
((u8*)fatBuffer)[offset] = (value & 0x0FF0) >> 4;
} else {
-
+
oldValue = ((u8*)fatBuffer)[offset] & 0xFF;
((u8*)fatBuffer)[offset] = value & 0xFF;
-
+
offset++;
if (offset >= BYTE_PER_READ) {
offset = 0;
// write the buffer back to disc
disc_WriteSector(fatBufferCurSector, fatBuffer);
- // read the next sector
+ // read the next sector
fatBufferCurSector++;
disc_ReadSector(fatBufferCurSector, fatBuffer);
}
-
+
oldValue |= (((u8*)fatBuffer)[offset] & 0x0F) << 8;
((u8*)fatBuffer)[offset] = (((u8*)fatBuffer)[offset] & 0xF0) | ((value >> 8) & 0x0F);
}
- if (oldValue >= 0x0FF7)
+ if (oldValue >= 0x0FF7)
{
oldValue = CLUSTER_EOF;
}
break;
-
+
case FS_FAT16:
sector = filesysFAT + ((cluster << 1) / BYTE_PER_READ);
offset = cluster % (BYTE_PER_READ >> 1);
@@ -634,23 +634,23 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value)
// Load correct sector to buffer
fatBufferCurSector = sector;
disc_ReadSector(fatBufferCurSector, fatBuffer);
- }
+ }
// write the value to the FAT buffer
oldValue = ((u16*)fatBuffer)[offset];
((u16*)fatBuffer)[offset] = value;
- if (oldValue >= 0xFFF7)
+ if (oldValue >= 0xFFF7)
{
oldValue = CLUSTER_EOF;
}
break;
-
+
case FS_FAT32:
sector = filesysFAT + ((cluster << 2) / BYTE_PER_READ);
offset = cluster % (BYTE_PER_READ >> 2);
-
+
// If FAT buffer contains wrong sector
if (sector != fatBufferCurSector)
{
@@ -666,18 +666,18 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value)
oldValue = ((u32*)fatBuffer)[offset];
((u32*)fatBuffer)[offset] = value;
- if (oldValue >= 0x0FFFFFF7)
+ if (oldValue >= 0x0FFFFFF7)
{
oldValue = CLUSTER_EOF;
}
break;
-
+
default:
oldValue = CLUSTER_FREE;
break;
}
-
+
return oldValue;
}
#endif
@@ -727,7 +727,7 @@ u32 FAT_FirstFreeCluster(void)
/*-----------------------------------------------------------------
FAT_LinkFreeCluster
Internal function - gets the first available free cluster, sets it
-to end of file, links the input cluster to it then returns the
+to end of file, links the input cluster to it then returns the
cluster number
-----------------------------------------------------------------*/
u32 FAT_LinkFreeCluster(u32 cluster)
@@ -746,7 +746,7 @@ u32 FAT_LinkFreeCluster(u32 cluster)
{
return curLink; // Return the current link - don't allocate a new one
}
-
+
// Get a free cluster
firstFree = FAT_FirstFreeCluster();
@@ -777,7 +777,7 @@ Internal function - frees any cluster used by a file
bool FAT_ClearLinks (u32 cluster)
{
u32 nextCluster;
-
+
if ((cluster < 0x0002) || (cluster > fatLastCluster))
return false;
@@ -793,7 +793,7 @@ bool FAT_ClearLinks (u32 cluster)
while ((cluster != CLUSTER_EOF) && (cluster != CLUSTER_FREE))
{
cluster = FAT_ReadWriteFatEntryBuffered (cluster, CLUSTER_FREE);
- }
+ }
// Flush fat write buffer
FAT_WriteFatEntryFlushBuffer ();
@@ -814,7 +814,7 @@ bool FAT_InitFiles (void)
int i;
int bootSector;
BOOT_SEC* bootSec;
-
+
if (!disc_Init())
{
return (false);
@@ -830,7 +830,7 @@ bool FAT_InitFiles (void)
return false;
}*/
-
+
// Check if there is a FAT string, which indicates this is a boot sector
if ((globalBuffer[0x36] == 'F') && (globalBuffer[0x37] == 'A') && (globalBuffer[0x38] == 'T'))
@@ -848,9 +848,9 @@ bool FAT_InitFiles (void)
// First check for an active partition
for (i=0x1BE; (i < 0x1FE) && (globalBuffer[i] != 0x80); i+= 0x10);
// If it didn't find an active partition, search for any valid partition
- if (i == 0x1FE)
+ if (i == 0x1FE)
for (i=0x1BE; (i < 0x1FE) && (globalBuffer[i+0x04] == 0x00); i+= 0x10);
-
+
// Go to first valid partition
if ( i != 0x1FE) // Make sure it found a partition
{
@@ -865,7 +865,7 @@ bool FAT_InitFiles (void)
if (!disc_ReadSector (bootSector, bootSec)) {
return false;
}
-
+
// Store required information about the file system
if (bootSec->sectorsPerFAT != 0)
{
@@ -875,7 +875,7 @@ bool FAT_InitFiles (void)
{
filesysSecPerFAT = bootSec->extBlock.fat32.sectorsPerFAT32;
}
-
+
if (bootSec->numSectorsSmall != 0)
{
filesysNumSec = bootSec->numSectorsSmall;
@@ -987,7 +987,7 @@ Return the file info structure of the next valid file entry
u32 dirCluster: IN cluster of subdirectory table
int entry: IN the desired file entry
int origin IN: relative position of the entry
-DIR_ENT return OUT: desired dirEntry. First char will be FILE_FREE if
+DIR_ENT return OUT: desired dirEntry. First char will be FILE_FREE if
the entry does not exist.
-----------------------------------------------------------------*/
DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
@@ -1011,8 +1011,8 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
{
return (dir);
}
-
- switch (origin)
+
+ switch (origin)
{
case SEEK_SET:
wrkDirCluster = dirCluster;
@@ -1022,7 +1022,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
case SEEK_CUR: // Don't change anything
break;
case SEEK_END: // Find entry signifying end of directory
- // Subtraction will never reach 0, so it keeps going
+ // Subtraction will never reach 0, so it keeps going
// until reaches end of directory
wrkDirCluster = dirCluster;
wrkDirSector = 0;
@@ -1055,7 +1055,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
{
notFound = true;
}
- firstSector = FAT_ClustToSect(wrkDirCluster);
+ firstSector = FAT_ClustToSect(wrkDirCluster);
}
else if ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER) && (wrkDirSector == (filesysData - filesysRootDir)))
{
@@ -1082,7 +1082,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
lfnName[0] = '\0';
}
}
- if (entry == 0)
+ if (entry == 0)
{
if (!lfnExists)
{
@@ -1128,7 +1128,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
}
}
} while (!found && !notFound);
-
+
// If no file is found, return FILE_FREE
if (notFound)
{
@@ -1141,7 +1141,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin)
/*-----------------------------------------------------------------
FAT_GetLongFilename
-Get the long name of the last file or directory retrived with
+Get the long name of the last file or directory retrived with
GetDirEntry. Also works for FindFirstFile and FindNextFile.
If a long name doesn't exist, it returns the short name
instead.
@@ -1156,14 +1156,14 @@ bool FAT_GetLongFilename (char* filename)
strncpy (filename, lfnName, MAX_FILENAME_LENGTH - 1);
filename[MAX_FILENAME_LENGTH - 1] = '\0';
-
+
return true;
}
/*-----------------------------------------------------------------
FAT_GetFilename
-Get the alias (short name) of the file or directory stored in
+Get the alias (short name) of the file or directory stored in
dirEntry
DIR_ENT dirEntry: IN a valid directory table entry
char* alias OUT: will be filled with the alias (short filename),
@@ -1192,7 +1192,7 @@ bool FAT_GetFilename (DIR_ENT dirEntry, char* alias)
}
}
else
- {
+ {
// Copy the filename from the dirEntry to the string
for (i = 0; (i < 8) && (dirEntry.name[i] != ' '); i++)
{
@@ -1230,7 +1230,7 @@ bool FAT_GetAlias (char* alias)
}
// Read in the last accessed directory entry
disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
-
+
return FAT_GetFilename (((DIR_ENT*)globalBuffer)[wrkDirOffset], alias);
}
@@ -1244,7 +1244,7 @@ u32 FAT_GetFileSize (void)
{
// Read in the last accessed directory entry
disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
-
+
return ((DIR_ENT*)globalBuffer)[wrkDirOffset].fileSize;
}
@@ -1257,7 +1257,7 @@ u32 FAT_GetFileCluster (void)
{
// Read in the last accessed directory entry
disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
-
+
return (((DIR_ENT*)globalBuffer)[wrkDirOffset].startCluster) | (((DIR_ENT*)globalBuffer)[wrkDirOffset].startClusterHigh << 16);
}
@@ -1270,7 +1270,7 @@ u8 FAT_GetFileAttributes (void)
{
// Read in the last accessed directory entry
disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
-
+
return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib;
}
@@ -1294,7 +1294,7 @@ u8 FAT_SetFileAttributes (const char* filename, u8 attributes, u8 mask)
disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib = (((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib & ~(mask & 0x27)) | (attributes & 0x27); // 0x27 is he settable attributes
-
+
disc_WriteSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib;
@@ -1305,7 +1305,7 @@ u8 FAT_SetFileAttributes (const char* filename, u8 attributes, u8 mask)
time_t FAT_FileTimeToCTime (u16 fileTime, u16 fileDate)
{
struct tm timeInfo;
-
+
timeInfo.tm_year = (fileDate >> 9) + 80; // years since midnight January 1970
timeInfo.tm_mon = ((fileDate >> 5) & 0xf) - 1; // Months since january
timeInfo.tm_mday = fileDate & 0x1f; // Day of the month
@@ -1326,7 +1326,7 @@ time_t FAT_GetFileCreationTime (void)
{
// Read in the last accessed directory entry
disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
-
+
return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].cTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].cDate);
}
@@ -1339,7 +1339,7 @@ time_t FAT_GetFileLastWriteTime (void)
{
// Read in the last accessed directory entry
disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer);
-
+
return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].mTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].mDate);
}
#endif
@@ -1374,8 +1374,8 @@ DIR_ENT FAT_DirEntFromPath (const char* path)
return;
}
#endif
-
- if (path[pathPos] == '/')
+
+ if (path[pathPos] == '/')
{
dirCluster = filesysRootDirClus; // Start at root directory
}
@@ -1383,13 +1383,13 @@ DIR_ENT FAT_DirEntFromPath (const char* path)
{
dirCluster = curWorkDirCluster; // Start at current working dir
}
-
+
// Eat any slash /
while ((path[pathPos] == '/') && (path[pathPos] != '\0'))
{
pathPos++;
}
-
+
// Search until can't continue
found = false;
notFound = false;
@@ -1437,7 +1437,7 @@ DIR_ENT FAT_DirEntFromPath (const char* path)
flagLFN = true;
}
}
-
+
// Add end of string char
name[namePos] = '\0';
@@ -1497,7 +1497,7 @@ DIR_ENT FAT_DirEntFromPath (const char* path)
dirEntry = FAT_GetDirEntry (dirCluster, 1, SEEK_CUR);
}
}
-
+
if (found && ((dirEntry.attrib & ATTRIB_DIR) == ATTRIB_DIR) && (path[pathPos] != '\0'))
// It has found a directory from within the path that needs to be followed
{
@@ -1505,7 +1505,7 @@ DIR_ENT FAT_DirEntFromPath (const char* path)
dirCluster = dirEntry.startCluster | (dirEntry.startClusterHigh << 16);
}
}
-
+
if (notFound)
{
dirEntry.name[0] = FILE_FREE;
@@ -1534,11 +1534,11 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
bool flagLFN, dotSeen;
char fileAlias[13] = {0};
int tailNum;
-
+
unsigned char chkSum = 0;
-
+
u32 oldWorkDirCluster;
-
+
DIR_ENT* dirEntries = (DIR_ENT*)globalBuffer;
u32 dirCluster;
int secOffset;
@@ -1566,7 +1566,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
{
curWorkDirCluster = filesysRootDirClus;
}
-
+
pathPos = 0;
filePos = 0;
flagLFN = false;
@@ -1576,7 +1576,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
if (path[pathPos + filePos] == '/')
{
filename[filePos] = '\0';
- if (FAT_chdir(filename) == false)
+ if (FAT_chdir(filename) == false)
{
curWorkDirCluster = oldWorkDirCluster;
return false; // Couldn't change directory
@@ -1587,17 +1587,17 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
filename[filePos] = path[pathPos + filePos];
filePos++;
}
-
+
// Skip over last slashes
while (path[pathPos] == '/')
pathPos++;
-
+
// Check if the filename has a leading "."
// If so, it is an LFN
if (path[pathPos] == '.') {
flagLFN = true;
}
-
+
// Copy name from path
filePos = 0;
dotSeen = false;
@@ -1622,12 +1622,12 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
flagLFN = true;
}
}
-
+
if (filePos == 0) // No filename
{
return false;
}
-
+
// Check if a long filename was specified
if (filePos > 12)
{
@@ -1638,7 +1638,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
if (!flagLFN && (strrchr (filename, '.') != NULL) && (strlen(strrchr(filename, '.')) > 4)) {
flagLFN = true;
}
-
+
lfnPos = (filePos - 1) / 13;
// Add end of string char
@@ -1646,8 +1646,8 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
// Clear remaining chars
while (filePos < MAX_FILENAME_LENGTH)
filename[filePos++] = 0x01; // Set for LFN compatibility
-
-
+
+
if (flagLFN)
{
// Generate short filename - always a 2 digit number for tail
@@ -1666,7 +1666,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
// Pad Alias with underscores
while (aliasPos < 5)
fileAlias[aliasPos++] = '_';
-
+
fileAlias[5] = '~';
fileAlias[8] = '.';
fileAlias[9] = ' ';
@@ -1692,14 +1692,14 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
} else {
aliasPos = 9;
}
-
+
// Pad Alias extension with spaces
while (aliasPos < 12)
fileAlias[aliasPos++] = ' ';
-
+
fileAlias[12] = '\0';
-
-
+
+
// Get a valid tail number
tailNum = 0;
do {
@@ -1707,7 +1707,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
fileAlias[6] = 0x30 + ((tailNum / 10) % 10); // 10's digit
fileAlias[7] = 0x30 + (tailNum % 10); // 1's digit
} while ((FAT_DirEntFromPath(fileAlias).name[0] != FILE_FREE) && (tailNum < 100));
-
+
if (tailNum < 100) // Found an alias not being used
{
// Calculate file checksum
@@ -1725,7 +1725,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
{
return false;
}
-
+
dirEntryLength = lfnPos + 2;
}
else // Its not a long file name
@@ -1743,7 +1743,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
dirEntryLength = 1;
}
-
+
// Change dirEntry name to match alias
for (aliasPos = 0; ((fileAlias[aliasPos] != '.') && (fileAlias[aliasPos] != '\0') && (aliasPos < 8)); aliasPos++)
{
@@ -1775,12 +1775,12 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
maxSectors = (dirCluster == FAT16_ROOT_DIR_CLUSTER ? (filesysData - filesysRootDir) : filesysSecPerClus);
firstSector = (dirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(dirCluster));
disc_ReadSector (firstSector + secOffset, dirEntries);
-
+
dirEntryRemain = dirEntryLength;
tempDirCluster = dirCluster;
tempSecOffset = secOffset;
tempEntryOffset = entryOffset;
-
+
// Search for a large enough space to fit in new directory entry
while ((dirEntries[entryOffset].name[0] != FILE_LAST) && (dirEntryRemain > 0))
{
@@ -1803,7 +1803,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
{
dirCluster = FAT_NextCluster(dirCluster);
}
- firstSector = FAT_ClustToSect(dirCluster);
+ firstSector = FAT_ClustToSect(dirCluster);
}
else if ((dirCluster == FAT16_ROOT_DIR_CLUSTER) && (secOffset == (filesysData - filesysRootDir)))
{
@@ -1824,7 +1824,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
}
// Modifying the last directory is a special case - have to erase following entries
- if (dirEntries[entryOffset].name[0] == FILE_LAST)
+ if (dirEntries[entryOffset].name[0] == FILE_LAST)
{
dirEndFlag = true;
}
@@ -1843,7 +1843,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
}
// Add new directory entry
- while (dirEntryRemain > 0)
+ while (dirEntryRemain > 0)
{
// Move to next entry, first pass advances from last used entry
entryOffset++;
@@ -1868,7 +1868,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
{
dirCluster = FAT_NextCluster(dirCluster);
}
- firstSector = FAT_ClustToSect(dirCluster);
+ firstSector = FAT_ClustToSect(dirCluster);
}
else if ((dirCluster == FAT16_ROOT_DIR_CLUSTER) && (secOffset == (filesysData - filesysRootDir)))
{
@@ -1900,7 +1900,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
lfnEntry.flag = ATTRIB_LFN;
lfnEntry.reserved1 = 0;
lfnEntry.reserved2 = 0;
-
+
*((DIR_ENT_LFN*)&dirEntries[entryOffset]) = lfnEntry;
lfnPos --;
lfnEntry.ordinal = 0;
@@ -1914,7 +1914,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry)
dirEntryRemain--;
}
-
+
// Write directory back to disk
disc_WriteSector (firstSector + secOffset, dirEntries);
@@ -1930,7 +1930,7 @@ FAT_FindNextFile
Gets the name of the next directory entry
(can be a file or subdirectory)
char* filename: OUT filename, must be at least 13 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindNextFile(char* filename)
@@ -1963,7 +1963,7 @@ FAT_FindFirstFile
Gets the name of the first directory entry and resets the count
(can be a file or subdirectory)
char* filename: OUT filename, must be at least 13 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindFirstFile(char* filename)
@@ -1971,7 +1971,7 @@ FILE_TYPE FAT_FindFirstFile(char* filename)
// Get the first directory entry
DIR_ENT file;
file = FAT_GetDirEntry (curWorkDirCluster, 1, SEEK_SET);
-
+
if (file.name[0] == FILE_FREE)
{
return FT_NONE; // Did not find a file
@@ -1996,7 +1996,7 @@ FAT_FindFirstFileLFN
Gets the long file name of the first directory entry and resets
the count (can be a file or subdirectory)
char* lfn: OUT long file name, must be at least 256 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindFirstFileLFN(char* lfn)
@@ -2012,7 +2012,7 @@ FAT_FindNextFileLFN
Gets the long file name of the next directory entry
(can be a file or subdirectory)
char* lfn: OUT long file name, must be at least 256 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindNextFileLFN(char* lfn)
@@ -2026,29 +2026,29 @@ FILE_TYPE FAT_FindNextFileLFN(char* lfn)
/*-----------------------------------------------------------------
FAT_FileExists
-Returns the type of file
+Returns the type of file
char* filename: IN filename of the file to look for
-FILE_TYPE return: OUT returns FT_NONE if there is now file with
+FILE_TYPE return: OUT returns FT_NONE if there is now file with
that name, FT_FILE if it is a file and FT_DIR if it is a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FileExists(const char* filename)
{
- DIR_ENT dirEntry;
- // Get the dirEntry for the path specified
- dirEntry = FAT_DirEntFromPath (filename);
-
- if (dirEntry.name[0] == FILE_FREE)
- {
- return FT_NONE;
- }
- else if (dirEntry.attrib & ATTRIB_DIR)
- {
- return FT_DIR;
- }
- else
- {
- return FT_FILE;
- }
+ DIR_ENT dirEntry;
+ // Get the dirEntry for the path specified
+ dirEntry = FAT_DirEntFromPath (filename);
+
+ if (dirEntry.name[0] == FILE_FREE)
+ {
+ return FT_NONE;
+ }
+ else if (dirEntry.attrib & ATTRIB_DIR)
+ {
+ return FT_DIR;
+ }
+ else
+ {
+ return FT_FILE;
+ }
}
/*-----------------------------------------------------------------
@@ -2074,7 +2074,7 @@ u32 FAT_GetFileSystemTotalSize (void)
/*-----------------------------------------------------------------
FAT_chdir
Changes the current working directory
-const char* path: IN null terminated string of directory separated by
+const char* path: IN null terminated string of directory separated by
forward slashes, / is root
bool return: OUT returns true if successful
-----------------------------------------------------------------*/
@@ -2090,7 +2090,7 @@ bool FAT_chdir (const char* path)
{
return true;
}
-
+
dir = FAT_DirEntFromPath (path);
if (((dir.attrib & ATTRIB_DIR) == ATTRIB_DIR) && (dir.name[0] != FILE_FREE))
@@ -2111,7 +2111,7 @@ bool FAT_chdir (const char* path)
return true;
}
else
- {
+ {
// Couldn't change directory - wrong path specified
return false;
}
@@ -2120,12 +2120,12 @@ bool FAT_chdir (const char* path)
/*-----------------------------------------------------------------
FAT_fopen(filename, mode)
Opens a file
-const char* path: IN null terminated string of filename and path
+const char* path: IN null terminated string of filename and path
separated by forward slashes, / is root
const char* mode: IN mode to open file in
Supported modes: "r", "r+", "w", "w+", "a", "a+", don't use
"b" or "t" in any mode, as all files are openned in binary mode
-FAT_FILE* return: OUT handle to open file, returns NULL if the file
+FAT_FILE* return: OUT handle to open file, returns NULL if the file
couldn't be openned
-----------------------------------------------------------------*/
FAT_FILE* FAT_fopen(const char* path, const char* mode)
@@ -2149,10 +2149,10 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
{
return NULL;
}
-
+
// Get the dirEntry for the path specified
dirEntry = FAT_DirEntFromPath (path);
-
+
// Check that it is not a directory
if (dirEntry.attrib & ATTRIB_DIR)
{
@@ -2174,7 +2174,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
// Find a free file buffer
for (fileNum = 0; (fileNum < MAX_FILES_OPEN) && (openFiles[fileNum].inUse == true); fileNum++);
-
+
if (fileNum == MAX_FILES_OPEN) // No free files
{
return NULL;
@@ -2191,7 +2191,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
{
return NULL;
}
-
+
file->read = true;
#ifdef CAN_WRITE_TO_DISC
file->write = ( strchr(mode, '+') != NULL ); //(mode[1] == '+');
@@ -2199,13 +2199,13 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
file->write = false;
#endif
file->append = false;
-
+
// Store information about position within the file, for use
// by FAT_fread, FAT_fseek, etc.
file->firstCluster = dirEntry.startCluster | (dirEntry.startClusterHigh << 16);
-
+
#ifdef CAN_WRITE_TO_DISC
- // Check if file is openned for random. If it is, and currently has no cluster, one must be
+ // Check if file is openned for random. If it is, and currently has no cluster, one must be
// assigned to it.
if (file->write && file->firstCluster == CLUSTER_FREE)
{
@@ -2223,7 +2223,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
disc_WriteSector (file->dirEntSector, globalBuffer);
}
#endif
-
+
file->length = dirEntry.fileSize;
file->curPos = 0;
file->curClus = dirEntry.startCluster | (dirEntry.startClusterHigh << 16);
@@ -2234,7 +2234,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
file->appByte = 0;
file->appClus = 0;
file->appSect = 0;
-
+
disc_ReadSector( FAT_ClustToSect( file->curClus), file->readBuffer);
file->inUse = true; // We're using this file now
@@ -2248,7 +2248,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
{
dirEntry.attrib = ATTRIB_ARCH;
dirEntry.reserved = 0;
-
+
// Time and date set to system time and date
dirEntry.cTime_ms = 0;
dirEntry.cTime = getRTCtoFileTime();
@@ -2257,12 +2257,12 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
dirEntry.mTime = getRTCtoFileTime();
dirEntry.mDate = getRTCtoFileDate();
}
- else // Already a file entry
+ else // Already a file entry
{
// Free any clusters used
FAT_ClearLinks (dirEntry.startCluster | (dirEntry.startClusterHigh << 16));
}
-
+
// Get a cluster to use
startCluster = FAT_LinkFreeCluster (CLUSTER_FREE);
if (startCluster == CLUSTER_FREE) // Couldn't get a free cluster
@@ -2298,13 +2298,13 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
((DIR_ENT*) globalBuffer)[file->dirEntOffset] = dirEntry;
disc_WriteSector (file->dirEntSector, globalBuffer);
}
-
+
// Now that file is created, open it
file->read = ( strchr(mode, '+') != NULL ); //(mode[1] == '+');
file->write = true;
file->append = false;
-
+
// Store information about position within the file, for use
// by FAT_fread, FAT_fseek, etc.
file->firstCluster = startCluster;
@@ -2318,7 +2318,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
file->appByte = 0;
file->appClus = 0;
file->appSect = 0;
-
+
// Empty file, so empty read buffer
memset (file->readBuffer, 0, BYTE_PER_READ);
file->inUse = true; // We're using this file now
@@ -2332,7 +2332,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
{
dirEntry.attrib = ATTRIB_ARCH;
dirEntry.reserved = 0;
-
+
// Time and date set to system time and date
dirEntry.cTime_ms = 0;
dirEntry.cTime = getRTCtoFileTime();
@@ -2352,13 +2352,13 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
}
dirEntry.startCluster = (startCluster & 0xFFFF);
dirEntry.startClusterHigh = ((startCluster >> 16) & 0xFFFF);
-
+
if(!FAT_AddDirEntry (path, dirEntry))
return NULL;
-
+
// Get the newly created dirEntry
dirEntry = FAT_DirEntFromPath (path);
-
+
// Store append cluster
file->appClus = startCluster;
@@ -2377,7 +2377,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
{
return NULL;
}
-
+
// Store cluster position into the directory entry
dirEntry.startCluster = (file->firstCluster & 0xFFFF);
dirEntry.startClusterHigh = ((file->firstCluster >> 16) & 0xFFFF);
@@ -2387,7 +2387,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
// Store append cluster
file->appClus = startCluster;
-
+
} else {
// Follow cluster list until last one is found
@@ -2410,7 +2410,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
file->read = ( strchr(mode, '+') != NULL );
file->write = false;
file->append = true;
-
+
// Calculate the sector and byte of the current position,
// and store them
file->appSect = (dirEntry.fileSize % filesysBytePerClus) / BYTE_PER_READ;
@@ -2424,7 +2424,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode)
file->curClus = file->appClus;
file->curSect = file->appSect;
file->curByte = file->appByte;
-
+
// Read into buffer
disc_ReadSector( FAT_ClustToSect(file->curClus) + file->curSect, file->readBuffer);
file->inUse = true; // We're using this file now
@@ -2464,7 +2464,7 @@ bool FAT_fclose (FAT_FILE* file)
disc_CacheFlush();
}
#endif
- file->inUse = false;
+ file->inUse = false;
return true;
}
else
@@ -2515,14 +2515,14 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin)
}
// Can't seek in append only mode
- if (!file->read && !file->write)
+ if (!file->read && !file->write)
{
return -1;
}
curPos = file->curPos;
- switch (origin)
+ switch (origin)
{
case SEEK_SET:
if (offset >= 0)
@@ -2537,13 +2537,13 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin)
if (offset >= 0)
{
position = curPos + offset;
- }
+ }
else if ( (u32)(offset * -1) >= curPos )
{
// Tried to seek before start of file
position = 0;
}
- else
+ else
{
// Using u32 to maintain 32 bits of accuracy
position = curPos - (u32)(offset * -1);
@@ -2560,7 +2560,7 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin)
// Tried to seek before start of file
position = 0;
}
- else
+ else
{
// Using u32 to maintain 32 bits of accuracy
position = file->length - (u32)(offset * -1);
@@ -2575,7 +2575,7 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin)
// Tried to go past end of file
position = file->length;
}
-
+
// Save position
file->curPos = position;
@@ -2608,14 +2608,14 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin)
nextCluster = FAT_NextCluster (cluster);
}
// Check if ran out of clusters, and the file is being written to
- if ((clusCount >= 0) && (file->write || file->append))
+ if ((clusCount >= 0) && (file->write || file->append))
{
// Set flag to allocate a new cluster
file->curSect = filesysSecPerClus;
file->curByte = 0;
}
file->curClus = cluster;
-
+
// Reload sector buffer for new position in file, if it is a different sector
if ((curPos ^ position) >= BYTE_PER_READ)
{
@@ -2645,7 +2645,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file)
int curSect;
u32 curClus;
u32 tempNextCluster;
-
+
int tempVar;
char* data = (char*)buffer;
@@ -2678,14 +2678,14 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file)
if (tempVar > remain)
tempVar = remain;
- if ((tempVar < BYTE_PER_READ) && flagNoError)
+ if ((tempVar < BYTE_PER_READ) && flagNoError)
{
memcpy(data, &(file->readBuffer[curByte]), tempVar);
remain -= tempVar;
data += tempVar;
curByte += tempVar;
- if (curByte >= BYTE_PER_READ)
+ if (curByte >= BYTE_PER_READ)
{
curByte = 0;
curSect++;
@@ -2694,7 +2694,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file)
// align to cluster
// tempVar is number of sectors to read
- if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ)
+ if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ)
{
tempVar = filesysSecPerClus - curSect;
} else {
@@ -2789,7 +2789,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file)
FAT_fwrite(buffer, size, count, file)
Writes size * count bytes into file from buffer, starting
from current position. It then sets the current position to the
- byte after the last byte written. If the file was openned in
+ byte after the last byte written. If the file was openned in
append mode it always writes to the end of the file.
const void* buffer IN: Pointer to buffer containing data. Should be
at least as big as the number of bytes to be written.
@@ -2870,7 +2870,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file)
disc_ReadSector( FAT_ClustToSect( curClus), writeBuffer);
}
}
-
+
// Align to sector
tempVar = BYTE_PER_READ - curByte;
if (tempVar > remain)
@@ -2885,9 +2885,9 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file)
// Write buffer back to disk
disc_WriteSector (curSect + FAT_ClustToSect(curClus), writeBuffer);
-
+
// Move onto next sector
- if (curByte >= BYTE_PER_READ)
+ if (curByte >= BYTE_PER_READ)
{
curByte = 0;
curSect++;
@@ -2896,7 +2896,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file)
// Align to cluster
// tempVar is number of sectors to write
- if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ)
+ if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ)
{
tempVar = filesysSecPerClus - curSect;
} else {
@@ -2964,7 +2964,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file)
remain -= tempVar * BYTE_PER_READ;
curSect += tempVar;
}
-
+
// Last remaining sector
// Check if sector wanted is different to the one started with
if ( (( (file->append ? file->appByte : file->curByte) + length) >= BYTE_PER_READ) && flagNoError)
@@ -2984,7 +2984,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file)
disc_WriteSector( curSect + FAT_ClustToSect( curClus), writeBuffer);
}
}
-
+
// Amount read is the originally requested amount minus stuff remaining
length = length - remain;
@@ -3041,14 +3041,14 @@ int FAT_remove (const char* path)
u32 oldWorkDirCluster;
char checkFilename[13];
FILE_TYPE checkFiletype;
-
+
dirEntry = FAT_DirEntFromPath (path);
if (dirEntry.name[0] == FILE_FREE)
{
return -1;
}
-
+
// Only delete directories if the directory is entry
if (dirEntry.attrib & ATTRIB_DIR)
{
@@ -3062,10 +3062,10 @@ int FAT_remove (const char* path)
{
checkFiletype = FAT_FindNextFile (checkFilename);
}
-
+
// Change back to working directory
curWorkDirCluster = oldWorkDirCluster;
-
+
// Check that the directory is empty
if (checkFiletype != FT_NONE)
{
@@ -3084,7 +3084,7 @@ int FAT_remove (const char* path)
disc_ReadSector ( (wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector , globalBuffer);
((DIR_ENT*)globalBuffer)[wrkDirOffset].name[0] = FILE_FREE;
disc_WriteSector ( (wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector , globalBuffer);
-
+
// Flush any sectors in disc cache
disc_CacheFlush();
@@ -3095,7 +3095,7 @@ int FAT_remove (const char* path)
#ifdef CAN_WRITE_TO_DISC
/*-----------------------------------------------------------------
FAT_mkdir (path)
-Makes a new directory, so long as no other directory or file has
+Makes a new directory, so long as no other directory or file has
the same name.
const char* path IN: Path and filename of directory to make
int return OUT: zero if successful, non-zero if not
@@ -3123,7 +3123,7 @@ int FAT_mkdir (const char* path)
{
curWorkDirCluster = filesysRootDirClus;
}
-
+
pathPos = 0;
filePos = 0;
@@ -3132,7 +3132,7 @@ int FAT_mkdir (const char* path)
if (path[pathPos + filePos] == '/')
{
pathname[filePos] = '\0';
- if (FAT_chdir(pathname) == false)
+ if (FAT_chdir(pathname) == false)
{
curWorkDirCluster = oldDirCluster;
return -1; // Couldn't change directory
@@ -3236,9 +3236,9 @@ FAT_fgets (char *tgtBuffer, int num, FAT_FILE* file)
Gets a up to num bytes from file, stopping at the first
newline.
-CAUTION: does not do strictly streaming. I.e. it's
+CAUTION: does not do strictly streaming. I.e. it's
reading more then needed bytes and seeking back.
- shouldn't matter for random access
+ shouldn't matter for random access
char *tgtBuffer OUT: buffer to write to
int num IN: size of target buffer
@@ -3250,62 +3250,62 @@ bool return OUT: character if successful, EOF if not
* Added check for unix style text files
* Removed seek when no newline is found, since it isn't necessary
-------------------------------------------------------------------*/
-char *FAT_fgets(char *tgtBuffer, int num, FAT_FILE* file)
-{
+char *FAT_fgets(char *tgtBuffer, int num, FAT_FILE* file)
+{
u32 curPos;
u32 readLength;
char *returnChar;
-
- // invalid filehandle
+
+ // invalid filehandle
if (file == NULL)
{
- return NULL ;
+ return NULL ;
}
-
- // end of file
+
+ // end of file
if (FAT_feof(file)==true)
{
- return NULL ;
- }
-
- // save current position
- curPos = FAT_ftell(file);
-
- // read the full buffer (max string chars is num-1 and one end of string \0
- readLength = FAT_fread(tgtBuffer,1,num-1,file) ;
-
- // mark least possible end of string
- tgtBuffer[readLength] = '\0' ;
-
- if (readLength==0) {
- // return error
- return NULL ;
- }
-
- // get position of first return '\r'
- returnChar = strchr(tgtBuffer,'\r');
-
+ return NULL ;
+ }
+
+ // save current position
+ curPos = FAT_ftell(file);
+
+ // read the full buffer (max string chars is num-1 and one end of string \0
+ readLength = FAT_fread(tgtBuffer,1,num-1,file) ;
+
+ // mark least possible end of string
+ tgtBuffer[readLength] = '\0' ;
+
+ if (readLength==0) {
+ // return error
+ return NULL ;
+ }
+
+ // get position of first return '\r'
+ returnChar = strchr(tgtBuffer,'\r');
+
// if no return is found, search for a newline
if (returnChar == NULL)
{
returnChar = strchr(tgtBuffer,'\n');
}
-
- // Mark the return, if existant, as end of line/string
- if (returnChar!=NULL) {
- *returnChar++ = 0 ;
- if (*returnChar=='\n') { // catch newline too when jumping over the end
- // return to location after \r\n (strlen+2)
- FAT_fseek(file,curPos+strlen(tgtBuffer)+2,SEEK_SET) ;
- return tgtBuffer ;
- } else {
- // return to location after \r (strlen+1)
- FAT_fseek(file,curPos+strlen(tgtBuffer)+1,SEEK_SET) ;
- return tgtBuffer ;
+
+ // Mark the return, if existant, as end of line/string
+ if (returnChar!=NULL) {
+ *returnChar++ = 0 ;
+ if (*returnChar=='\n') { // catch newline too when jumping over the end
+ // return to location after \r\n (strlen+2)
+ FAT_fseek(file,curPos+strlen(tgtBuffer)+2,SEEK_SET) ;
+ return tgtBuffer ;
+ } else {
+ // return to location after \r (strlen+1)
+ FAT_fseek(file,curPos+strlen(tgtBuffer)+1,SEEK_SET) ;
+ return tgtBuffer ;
}
}
-
- return tgtBuffer ;
+
+ return tgtBuffer ;
}
#ifdef CAN_WRITE_TO_DISC
@@ -3322,20 +3322,20 @@ bool return OUT: number of characters written if successful,
* Uses FAT_FILE instead of int
* writtenBytes is now u32 instead of int
-------------------------------------------------------------------*/
-int FAT_fputs (const char *string, FAT_FILE* file)
-{
+int FAT_fputs (const char *string, FAT_FILE* file)
+{
u32 writtenBytes;
- // save string except end of string '\0'
- writtenBytes = FAT_fwrite((void *)string, 1, strlen(string), file);
+ // save string except end of string '\0'
+ writtenBytes = FAT_fwrite((void *)string, 1, strlen(string), file);
- // check if we had an error
- if (writtenBytes != strlen(string))
- {
- // return EOF error
+ // check if we had an error
+ if (writtenBytes != strlen(string))
+ {
+ // return EOF error
return EOF;
}
- // return the charcount written
- return writtenBytes ;
+ // return the charcount written
+ return writtenBytes ;
}
#endif
diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.h b/backends/platform/ds/arm9/source/fat/gba_nds_fat.h
index b238182e14..c554cc80f6 100644
--- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.h
+++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.h
@@ -147,7 +147,7 @@ bool FAT_GetAlias (char* alias);
/*-----------------------------------------------------------------
FAT_GetLongFilename
-Get the long name of the last file or directory retrived with
+Get the long name of the last file or directory retrived with
GetDirEntry. Also works for FindFirstFile and FindNextFile
char* filename: OUT will be filled with the filename, should be at
least 256 bytes long
@@ -210,7 +210,7 @@ FAT_FindNextFile
Gets the name of the next directory entry
(can be a file or subdirectory)
char* filename: OUT filename, must be at least 13 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindNextFile (char* filename);
@@ -220,7 +220,7 @@ FAT_FindFirstFile
Gets the name of the first directory entry and resets the count
(can be a file or subdirectory)
char* filename: OUT filename, must be at least 13 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindFirstFile (char* filename);
@@ -230,7 +230,7 @@ FAT_FindFirstFileLFN
Gets the long file name of the first directory entry and resets
the count (can be a file or subdirectory)
char* lfn: OUT long file name, must be at least 256 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindFirstFileLFN(char* lfn);
@@ -240,16 +240,16 @@ FAT_FindNextFileLFN
Gets the long file name of the next directory entry
(can be a file or subdirectory)
char* lfn: OUT long file name, must be at least 256 chars long
-FILE_TYPE return: OUT returns FT_NONE if failed,
+FILE_TYPE return: OUT returns FT_NONE if failed,
FT_FILE if it found a file and FT_DIR if it found a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FindNextFileLFN(char* lfn);
/*-----------------------------------------------------------------
FAT_FileExists
-Returns the type of file
+Returns the type of file
char* filename: IN filename of the file to look for
-FILE_TYPE return: OUT returns FT_NONE if there is now file with
+FILE_TYPE return: OUT returns FT_NONE if there is now file with
that name, FT_FILE if it is a file and FT_DIR if it is a directory
-----------------------------------------------------------------*/
FILE_TYPE FAT_FileExists (const char* filename);
@@ -269,7 +269,7 @@ u32 FAT_GetFileSystemTotalSize (void);
/*-----------------------------------------------------------------
FAT_chdir
Changes the current working directory
-const char* path: IN null terminated string of directory separated by
+const char* path: IN null terminated string of directory separated by
forward slashes, / is root
bool return: OUT returns true if successful
-----------------------------------------------------------------*/
@@ -282,12 +282,12 @@ bool FAT_chdir (const char* path);
/*-----------------------------------------------------------------
FAT_fopen(filename, mode)
Opens a file
-const char* path: IN null terminated string of filename and path
+const char* path: IN null terminated string of filename and path
separated by forward slashes, / is root
const char* mode: IN mode to open file in
Supported modes: "r", "r+", "w", "w+", "a", "a+", don't use
"b" or "t" in any mode, as all files are openned in binary mode
-FAT_FILE* return: OUT handle to open file, returns -1 if the file
+FAT_FILE* return: OUT handle to open file, returns -1 if the file
couldn't be openned
-----------------------------------------------------------------*/
FAT_FILE* FAT_fopen(const char* path, const char* mode);
@@ -338,7 +338,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file);
FAT_fwrite(buffer, size, count, file)
Writes size * count bytes into file from buffer, starting
from current position. It then sets the current position to the
- byte after the last byte written. If the file was openned in
+ byte after the last byte written. If the file was openned in
append mode it always writes to the end of the file.
const void* buffer IN: Pointer to buffer containing data. Should be
at least as big as the number of bytes to be written.
@@ -371,7 +371,7 @@ int FAT_remove (const char* path);
#ifdef CAN_WRITE_TO_DISC
/*-----------------------------------------------------------------
FAT_mkdir (path)
-Makes a new directory, so long as no other directory or file has
+Makes a new directory, so long as no other directory or file has
the same name.
const char* path IN: Path and filename of directory to make
int return OUT: zero if successful, non-zero if not
@@ -403,9 +403,9 @@ FAT_fgets (char *tgtBuffer, int num, FAT_FILE* file)
Gets a up to num bytes from file, stopping at the first
newline.
-CAUTION: does not do strictly streaming. I.e. it's
+CAUTION: does not do strictly streaming. I.e. it's
reading more then needed bytes and seeking back.
- shouldn't matter for random access
+ shouldn't matter for random access
char *tgtBuffer OUT: buffer to write to
int num IN: size of target buffer
diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.h b/backends/platform/ds/arm9/source/fat/io_dldi.h
index 053de3a94c..034c6aace3 100644
--- a/backends/platform/ds/arm9/source/fat/io_dldi.h
+++ b/backends/platform/ds/arm9/source/fat/io_dldi.h
@@ -1,8 +1,8 @@
/*
- io_dldi.h
+ io_dldi.h
Reserved space for new drivers
-
+
This software is completely free. No warranty is provided.
If you use it, please give me credit and email me about your
project at chishm@hotmail.com
diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.s b/backends/platform/ds/arm9/source/fat/io_dldi.s
index c2314e772d..311d43f3ff 100644
--- a/backends/platform/ds/arm9/source/fat/io_dldi.s
+++ b/backends/platform/ds/arm9/source/fat/io_dldi.s
@@ -18,7 +18,7 @@
.byte 0x0F @32KiB @ Log [base-2] of the size of this driver in bytes.
.byte 0x00 @ Sections to fix
.byte 0x0F @32KiB @ Log [base-2] of the allocated space in bytes.
-
+
@---------------------------------------------------------------------------------
@ Text identifier - can be anything up to 47 chars + terminating null -- 16 bytes
.align 4
@@ -42,13 +42,13 @@ _dldi_driver_name:
_io_dldi:
.ascii "DLDI" @ ioType
.word 0x00000000 @ Features
- .word _DLDI_startup @
- .word _DLDI_isInserted @
+ .word _DLDI_startup @
+ .word _DLDI_isInserted @
.word _DLDI_readSectors @ Function pointers to standard device driver functions
- .word _DLDI_writeSectors @
- .word _DLDI_clearStatus @
- .word _DLDI_shutdown @
-
+ .word _DLDI_writeSectors @
+ .word _DLDI_clearStatus @
+ .word _DLDI_shutdown @
+
@---------------------------------------------------------------------------------
_DLDI_startup:
diff --git a/backends/platform/ds/arm9/source/fat/io_efa2.c b/backends/platform/ds/arm9/source/fat/io_efa2.c
index f3aa65cfcb..468361969e 100644
--- a/backends/platform/ds/arm9/source/fat/io_efa2.c
+++ b/backends/platform/ds/arm9/source/fat/io_efa2.c
@@ -47,7 +47,7 @@ See gba_nds_fat.txt for help and license details.
// ID of Samsung K9K1G NAND flash chip
#define EFA2_NAND_ID 0xEC79A5C0
-// first sector of udisk
+// first sector of udisk
#define EFA2_UDSK_START 0x40
//
@@ -101,7 +101,7 @@ void efa2_nand_lock(void) {
//
// Set NAND Flash chip enable and write protection bits ?
-//
+//
// val | ~CE | ~WP |
// -----+-----+-----+
// 0 | 0 | 0 |
@@ -125,7 +125,7 @@ inline void efa2_nand_reset(void) {
//
// Read out NAND ID information, could be used for card detection
-//
+//
// | EFA2 1GBit |
// ------------------+------------+
// maker code | 0xEC |
@@ -166,7 +166,7 @@ EFA2_ClearStatus
Reads and checks NAND status information
bool return OUT: true if NAND is idle
-----------------------------------------------------------------*/
-bool EFA2_ClearStatus (void)
+bool EFA2_ClearStatus (void)
{
// tbd: currently there is no write support, so always return
// true, there is no possibility for pending operations
@@ -178,7 +178,7 @@ EFA2_IsInserted
Checks to see if the NAND chip used by the EFA2 is present
bool return OUT: true if the correct NAND chip is found
-----------------------------------------------------------------*/
-bool EFA2_IsInserted (void)
+bool EFA2_IsInserted (void)
{
EFA2_ClearStatus();
return (efa2_nand_id() == EFA2_NAND_ID);
@@ -223,7 +223,7 @@ bool EFA2_ReadSectors (u32 sector, u8 numSecs, void* buffer)
efa2_nand_reset();
// set NAND to READ1 operation mode and transfer page address
- REG_EFA2_NAND_CMD = 0x00; // write READ1 command
+ REG_EFA2_NAND_CMD = 0x00; // write READ1 command
REG_EFA2_NAND_WR = 0x00; // write address [7:0]
REG_EFA2_NAND_WR = (page ) & 0xff; // write address [15:8]
REG_EFA2_NAND_WR = (page >> 8 ) & 0xff; // write address[23:16]
@@ -280,7 +280,7 @@ bool EFA2_WriteSectors (u32 sector, u8 numSecs, void* buffer)
EFA2_Shutdown
unload the EFA2 interface
-----------------------------------------------------------------*/
-bool EFA2_Shutdown(void)
+bool EFA2_Shutdown(void)
{
return EFA2_ClearStatus();
}
@@ -368,7 +368,7 @@ See gba_nds_fat.txt for help and license details.
// ID of Samsung K9K1G NAND flash chip
#define EFA2_NAND_ID 0xEC79A5C0
-// first sector of udisk
+// first sector of udisk
#define EFA2_UDSK_START 0x40
//
@@ -422,7 +422,7 @@ void efa2_nand_lock(void) {
//
// Set NAND Flash chip enable and write protection bits ?
-//
+//
// val | ~CE | ~WP |
// -----+-----+-----+
// 0 | 0 | 0 |
@@ -446,7 +446,7 @@ inline void efa2_nand_reset(void) {
//
// Read out NAND ID information, could be used for card detection
-//
+//
// | EFA2 1GBit |
// ------------------+------------+
// maker code | 0xEC |
@@ -487,7 +487,7 @@ EFA2_ClearStatus
Reads and checks NAND status information
bool return OUT: true if NAND is idle
-----------------------------------------------------------------*/
-bool EFA2_ClearStatus (void)
+bool EFA2_ClearStatus (void)
{
// tbd: currently there is no write support, so always return
// true, there is no possibility for pending operations
@@ -499,7 +499,7 @@ EFA2_IsInserted
Checks to see if the NAND chip used by the EFA2 is present
bool return OUT: true if the correct NAND chip is found
-----------------------------------------------------------------*/
-bool EFA2_IsInserted (void)
+bool EFA2_IsInserted (void)
{
EFA2_ClearStatus();
return (efa2_nand_id() == EFA2_NAND_ID);
@@ -544,7 +544,7 @@ bool EFA2_ReadSectors (u32 sector, u8 numSecs, void* buffer)
efa2_nand_reset();
// set NAND to READ1 operation mode and transfer page address
- REG_EFA2_NAND_CMD = 0x00; // write READ1 command
+ REG_EFA2_NAND_CMD = 0x00; // write READ1 command
REG_EFA2_NAND_WR = 0x00; // write address [7:0]
REG_EFA2_NAND_WR = (page ) & 0xff; // write address [15:8]
REG_EFA2_NAND_WR = (page >> 8 ) & 0xff; // write address[23:16]
@@ -601,7 +601,7 @@ bool EFA2_WriteSectors (u32 sector, u8 numSecs, void* buffer)
EFA2_Shutdown
unload the EFA2 interface
-----------------------------------------------------------------*/
-bool EFA2_Shutdown(void)
+bool EFA2_Shutdown(void)
{
return EFA2_ClearStatus();
}
diff --git a/backends/platform/ds/arm9/source/fat/io_fcsr.c b/backends/platform/ds/arm9/source/fat/io_fcsr.c
index d576dfbb0f..7a67a6b1b0 100644
--- a/backends/platform/ds/arm9/source/fat/io_fcsr.c
+++ b/backends/platform/ds/arm9/source/fat/io_fcsr.c
@@ -4,7 +4,7 @@
compact_flash.c
By chishm (Michael Chisholm)
- Hardware Routines for using a GBA Flash Cart and SRAM as a
+ Hardware Routines for using a GBA Flash Cart and SRAM as a
block device.
This software is completely free. No warranty is provided.
@@ -57,7 +57,7 @@ FCSR_IsInserted
Is a GBA Flash Cart with a valid file system inserted?
bool return OUT: true if a GBA FC card is inserted
-----------------------------------------------------------------*/
-bool FCSR_IsInserted (void)
+bool FCSR_IsInserted (void)
{
bool flagFoundFileSys = false;
@@ -85,7 +85,7 @@ FCSR_ClearStatus
Finish any pending operations
bool return OUT: always true for GBA FC
-----------------------------------------------------------------*/
-bool FCSR_ClearStatus (void)
+bool FCSR_ClearStatus (void)
{
return true;
}
@@ -101,7 +101,7 @@ void* buffer OUT: pointer to 512 byte buffer to store data in
bool return OUT: true if successful
-----------------------------------------------------------------*/
bool FCSR_ReadSectors (u32 sector, u8 numSecs, void* buffer)
-{
+{
int i;
bool flagSramSector = false;
int numSectors = (numSecs > 0 ? numSecs : 256);
@@ -208,14 +208,14 @@ bool FCSR_WriteSectors (u32 sector, u8 numSecs, void* buffer)
FCSR_Shutdown
unload the Flash Cart interface
-----------------------------------------------------------------*/
-bool FCSR_Shutdown(void)
+bool FCSR_Shutdown(void)
{
int i;
if (FCSR_ClearStatus() == false)
return false;
FCSR_FileSysPointer = 0;
-
+
for (i=0; i < 4; i++)
{
FCSR_SramSectorPointer[i] = 0;
@@ -262,11 +262,11 @@ bool FCSR_StartUp(void)
// Get SRAM sector regions from header block
for (i = 0; i < 4; i++)
{
- FCSR_SramSectorStart[i] = fileSysPointer[i+4];
+ FCSR_SramSectorStart[i] = fileSysPointer[i+4];
SramRegionSize[i] = fileSysPointer[i+8];
FCSR_SramSectorEnd[i] = FCSR_SramSectorStart[i] + SramRegionSize[i];
}
-
+
// Calculate SRAM region pointers
FCSR_SramSectorPointer[0] = (u8*)(SRAM_START + 4);
for (i = 1; i < 4; i++)
diff --git a/backends/platform/ds/arm9/source/fat/io_fcsr.h b/backends/platform/ds/arm9/source/fat/io_fcsr.h
index 2f87c1c8aa..ef390a8ad6 100644
--- a/backends/platform/ds/arm9/source/fat/io_fcsr.h
+++ b/backends/platform/ds/arm9/source/fat/io_fcsr.h
@@ -1,5 +1,5 @@
/*
- io_fcsr.h
+ io_fcsr.h
Hardware Routines for using a GBA Flash Cart with SRAM
@@ -23,7 +23,7 @@ extern LPIO_INTERFACE FCSR_GetInterface(void) ;
#endif // define IO_FCSR_H
/*
- io_fcsr.h
+ io_fcsr.h
Hardware Routines for using a GBA Flash Cart with SRAM
diff --git a/backends/platform/ds/arm9/source/fat/io_m3_common.c b/backends/platform/ds/arm9/source/fat/io_m3_common.c
index ab2c143327..9c8280c808 100644
--- a/backends/platform/ds/arm9/source/fat/io_m3_common.c
+++ b/backends/platform/ds/arm9/source/fat/io_m3_common.c
@@ -1,13 +1,13 @@
/*
- io_m3_common.c
+ io_m3_common.c
Routines common to all version of the M3
-
+
Some code based on M3 SD drivers supplied by M3Adapter.
Some code written by SaTa may have been unknowingly used.
Copyright (c) 2006 Michael "Chishm" Chisholm
-
+
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
@@ -47,7 +47,7 @@ void _M3_changeMode (u32 mode) {
_M3_readHalfword (0x08000000 + (mode << 1));
_M3_readHalfword (0x0800080e);
_M3_readHalfword (0x08000000);
-
+
if ((mode & 0x0f) != 4) {
_M3_readHalfword (0x09000000);
} else {
@@ -56,5 +56,5 @@ void _M3_changeMode (u32 mode) {
_M3_readHalfword (0x08000188);
_M3_readHalfword (0x08000188);
}
-}
+}
diff --git a/backends/platform/ds/arm9/source/fat/io_m3_common.h b/backends/platform/ds/arm9/source/fat/io_m3_common.h
index 92e6bed980..6d0c669783 100644
--- a/backends/platform/ds/arm9/source/fat/io_m3_common.h
+++ b/backends/platform/ds/arm9/source/fat/io_m3_common.h
@@ -1,5 +1,5 @@
/*
- io_m3_common.h
+ io_m3_common.h
Routines common to all version of the M3
@@ -7,7 +7,7 @@
Some code written by SaTa may have been unknowingly used.
Copyright (c) 2006 Michael "Chishm" Chisholm
-
+
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
@@ -40,7 +40,7 @@
// Values for changing mode
#define M3_MODE_ROM 0x00400004
-#define M3_MODE_MEDIA 0x00400003
+#define M3_MODE_MEDIA 0x00400003
extern void _M3_changeMode (u32 mode);
diff --git a/backends/platform/ds/arm9/source/fat/io_m3cf.c b/backends/platform/ds/arm9/source/fat/io_m3cf.c
index 910f01097e..968d83ae33 100644
--- a/backends/platform/ds/arm9/source/fat/io_m3cf.c
+++ b/backends/platform/ds/arm9/source/fat/io_m3cf.c
@@ -73,7 +73,7 @@ M3CF_IsInserted
Is a compact flash card inserted?
bool return OUT: true if a CF card is inserted
-----------------------------------------------------------------*/
-bool M3CF_IsInserted (void)
+bool M3CF_IsInserted (void)
{
// Change register, then check if value did change
M3_REG_STS = CF_STS_INSERTED;
@@ -86,17 +86,17 @@ M3CF_ClearStatus
Tries to make the CF card go back to idle mode
bool return OUT: true if a CF card is idle
-----------------------------------------------------------------*/
-bool M3CF_ClearStatus (void)
+bool M3CF_ClearStatus (void)
{
int i;
-
+
// Wait until CF card is finished previous commands
i=0;
while ((M3_REG_CMD & CF_STS_BUSY) && (i < CARD_TIMEOUT))
{
i++;
}
-
+
// Wait until card is ready for commands
i = 0;
while ((!(M3_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT))
@@ -128,7 +128,7 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
u8 *buff_u8 = (u8*)buffer;
int temp;
#endif
-
+
#if defined _CF_USE_DMA && defined NDS && defined ARM9
DC_FlushRange( buffer, j * BYTE_PER_READ);
#endif
@@ -139,7 +139,7 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
{
i++;
}
-
+
// Wait until card is ready for commands
i = 0;
while ((!(M3_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT))
@@ -148,20 +148,20 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Set number of sectors to read
- M3_REG_SEC = numSecs;
-
+ M3_REG_SEC = numSecs;
+
// Set read sector
M3_REG_LBA1 = sector & 0xFF; // 1st byte of sector number
M3_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number
M3_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number
M3_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number
-
+
// Set command to read
M3_REG_CMD = CF_CMD_READ;
-
-
+
+
while (j--)
{
// Wait until card is ready for reading
@@ -172,7 +172,7 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Read data
#ifdef _CF_USE_DMA
#ifdef NDS
@@ -194,12 +194,12 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
}
} else {
while(i--)
- *buff++ = *M3_DATA;
+ *buff++ = *M3_DATA;
}
#else
i=256;
while(i--)
- *buff++ = *M3_DATA;
+ *buff++ = *M3_DATA;
#endif
}
#if defined _CF_USE_DMA && defined NDS
@@ -230,7 +230,7 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
u8 *buff_u8 = (u8*)buffer;
int temp;
#endif
-
+
#if defined _CF_USE_DMA && defined NDS && defined ARM9
DC_FlushRange( buffer, j * BYTE_PER_READ);
#endif
@@ -241,7 +241,7 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
{
i++;
}
-
+
// Wait until card is ready for commands
i = 0;
while ((!(M3_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT))
@@ -250,19 +250,19 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Set number of sectors to write
- M3_REG_SEC = numSecs;
-
+ M3_REG_SEC = numSecs;
+
// Set write sector
M3_REG_LBA1 = sector & 0xFF; // 1st byte of sector number
M3_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number
M3_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number
M3_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number
-
+
// Set command to write
M3_REG_CMD = CF_CMD_WRITE;
-
+
while (j--)
{
// Wait until card is ready for writing
@@ -273,7 +273,7 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Write data
#ifdef _CF_USE_DMA
#ifdef NDS
@@ -295,19 +295,19 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
}
} else {
while(i--)
- *M3_DATA = *buff++;
+ *M3_DATA = *buff++;
}
#else
i=256;
while(i--)
- *M3_DATA = *buff++;
+ *M3_DATA = *buff++;
#endif
}
#if defined _CF_USE_DMA && defined NDS
// Wait for end of transfer before returning
while(DMA3_CR & DMA_BUSY);
#endif
-
+
return true;
}
@@ -317,7 +317,7 @@ M3_Unlock
Returns true if M3 was unlocked, false if failed
Added by MightyMax
-----------------------------------------------------------------*/
-bool M3_Unlock(void)
+bool M3_Unlock(void)
{
// run unlock sequence
volatile unsigned short tmp ;
diff --git a/backends/platform/ds/arm9/source/fat/io_m3cf.h b/backends/platform/ds/arm9/source/fat/io_m3cf.h
index bade53f511..006c283adc 100644
--- a/backends/platform/ds/arm9/source/fat/io_m3cf.h
+++ b/backends/platform/ds/arm9/source/fat/io_m3cf.h
@@ -1,5 +1,5 @@
/*
- io_m3cf.h
+ io_m3cf.h
Hardware Routines for reading a compact flash card
using the M3 CF
@@ -24,7 +24,7 @@ extern LPIO_INTERFACE M3CF_GetInterface(void) ;
#endif // define IO_M3CF_H
/*
- io_m3cf.h
+ io_m3cf.h
Hardware Routines for reading a compact flash card
using the M3 CF
diff --git a/backends/platform/ds/arm9/source/fat/io_m3sd.c b/backends/platform/ds/arm9/source/fat/io_m3sd.c
index 914b83e06e..2bbda37a5a 100644
--- a/backends/platform/ds/arm9/source/fat/io_m3sd.c
+++ b/backends/platform/ds/arm9/source/fat/io_m3sd.c
@@ -218,7 +218,7 @@ void M3SD_writesector(u16 * p,u32 sectorn)
}
} while ((verify > 0) && (tries < 16));
-
+
free(data);
free(check);
} // */
@@ -356,7 +356,7 @@ bool M3SD_Shutdown(void)
bool M3SD_StartUp(void)
{
vu16* waitCr = (vu16*)0x4000204;
-
+
*waitCr |= 0x6000;
// *(vu16*)0x4000204=0x6000;
// Try unlocking 3 times, because occationally it fails to detect the reader.
diff --git a/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s b/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s
index ffaa971aca..a6bb8dc187 100644
--- a/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s
+++ b/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s
@@ -54,7 +54,7 @@ sd_write_loop2:
sd_write_busy:
bl clkin
- ldrh r0,[r1]
+ ldrh r0,[r1]
tst r0,#0x100
beq sd_write_busy
ldmfd r13!,{r0-r1}
@@ -68,10 +68,10 @@ SD_crc16:
stmfd r13!,{r4-r9}
mov r9,r2
- mov r3,#0
- mov r4,#0
- mov r5,#0
- mov r6,#0
+ mov r3,#0
+ mov r4,#0
+ mov r5,#0
+ mov r6,#0
ldr r7,=0x80808080
ldr r8,=0x1021
@@ -86,19 +86,19 @@ sd_crc16_loop:
eorne r3,r3,r8
tst r2,r7,lsr #24
eorne r3,r3,r8
-
+
mov r4,r4,lsl #1
tst r4,#0x10000
eorne r4,r4,r8
tst r2,r7,lsr #25
eorne r4,r4,r8
-
+
mov r5,r5,lsl #1
tst r5,#0x10000
eorne r5,r5,r8
tst r2,r7,lsr #26
eorne r5,r5,r8
-
+
mov r6,r6,lsl #1
tst r6,#0x10000
eorne r6,r6,r8
@@ -107,7 +107,7 @@ sd_crc16_loop:
mov r7,r7,ror #4
subs r1,r1,#4
- bne sd_crc16_loop
+ bne sd_crc16_loop
mov r2,r9
mov r8,#16
@@ -145,7 +145,7 @@ SD_data_write:
mov r2,#SDODA
sd_data_write_busy:
bl clkin
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
beq sd_data_write_busy
@@ -169,7 +169,7 @@ sd_data_write_loop:
bl clkout
subs r5, r5, #2
- bne sd_data_write_loop
+ bne sd_data_write_loop
cmp r1,#0
movne r0,r1
@@ -184,10 +184,10 @@ sd_data_write_loop2:
bl clkout
subs r5, r5, #1
bne sd_data_write_loop2
-
+
sd_data_write_busy2:
bl clkin
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
beq sd_data_write_busy2
diff --git a/backends/platform/ds/arm9/source/fat/io_mmcf.c b/backends/platform/ds/arm9/source/fat/io_mmcf.c
index 3034afe311..5ccb3122e4 100644
--- a/backends/platform/ds/arm9/source/fat/io_mmcf.c
+++ b/backends/platform/ds/arm9/source/fat/io_mmcf.c
@@ -74,14 +74,14 @@ static bool cf_block_ready(void)
do
{
while (!(CF_RD_STATUS & 0x40));
- } while (CF_RD_STATUS & 0x80);
+ } while (CF_RD_STATUS & 0x80);
*/
do
{
i++;
- while ( (!(CF_RD_STATUS & 0x40)) && (i < CARD_TIMEOUT) ) i++;
- } while ( (CF_RD_STATUS & 0x80) && (i < CARD_TIMEOUT) );
+ while ( (!(CF_RD_STATUS & 0x40)) && (i < CARD_TIMEOUT) ) i++;
+ } while ( (CF_RD_STATUS & 0x80) && (i < CARD_TIMEOUT) );
if (i >= CARD_TIMEOUT) {
return false;
@@ -110,7 +110,7 @@ MMCF_IsInserted
Is a compact flash card inserted?
bool return OUT: true if a CF card is inserted
-----------------------------------------------------------------*/
-bool MMCF_IsInserted (void)
+bool MMCF_IsInserted (void)
{
if ( !cf_set_features(0xAA) ) return false;
@@ -123,7 +123,7 @@ MMCF_ClearStatus
Tries to make the CF card go back to idle mode
bool return OUT: true if a CF card is idle
-----------------------------------------------------------------*/
-bool MMCF_ClearStatus (void)
+bool MMCF_ClearStatus (void)
{
return true;
}
@@ -185,7 +185,7 @@ bool MMCF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
}
} else {
while(i--)
- *buff++ = *MP_DATA;
+ *buff++ = *MP_DATA;
}
#else
i=256;
@@ -222,15 +222,15 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
u8 *buff_u8 = (u8*)buffer;
int temp;
#endif
-
+
#if defined _CF_USE_DMA && defined NDS && defined ARM9
DC_FlushRange( buffer, j * BYTE_PER_READ);
#endif
- if (numSecs > 1)
+ if (numSecs > 1)
{
int r = 0;
-
+
for (r = 0; r < numSecs; r++)
{
MMCF_WriteSectors(sector + r, 1, ((unsigned char *) (buffer)) + 512);
@@ -270,12 +270,12 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
}
} else {
while(i--)
- *MP_DATA = *buff++;
+ *MP_DATA = *buff++;
}
#else
i=256;
while(i--)
- *MP_DATA = *buff++;
+ *MP_DATA = *buff++;
#endif
}
@@ -283,7 +283,7 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
#if defined _CF_USE_DMA && defined NDS
// Wait for end of transfer before returning
while(DMA3_CR & DMA_BUSY);
-#endif
+#endif
//#define _CF_VERIFY
@@ -312,7 +312,7 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
MMCF_Shutdown
unload the GBAMP CF interface
-----------------------------------------------------------------*/
-bool MMCF_Shutdown(void)
+bool MMCF_Shutdown(void)
{
return MMCF_ClearStatus() ;
}
diff --git a/backends/platform/ds/arm9/source/fat/io_mmcf.h b/backends/platform/ds/arm9/source/fat/io_mmcf.h
index baa43ac59f..fa9e6536ee 100644
--- a/backends/platform/ds/arm9/source/fat/io_mmcf.h
+++ b/backends/platform/ds/arm9/source/fat/io_mmcf.h
@@ -1,5 +1,5 @@
/*
- io_mmcf.h
+ io_mmcf.h
Hardware Routines for reading a compact flash card
using the GBA Movie Player
diff --git a/backends/platform/ds/arm9/source/fat/io_mpcf.c b/backends/platform/ds/arm9/source/fat/io_mpcf.c
index a12b6e8e1e..6b56e29291 100644
--- a/backends/platform/ds/arm9/source/fat/io_mpcf.c
+++ b/backends/platform/ds/arm9/source/fat/io_mpcf.c
@@ -73,7 +73,7 @@ MPCF_IsInserted
Is a compact flash card inserted?
bool return OUT: true if a CF card is inserted
-----------------------------------------------------------------*/
-bool MPCF_IsInserted (void)
+bool MPCF_IsInserted (void)
{
// Change register, then check if value did change
MP_REG_STS = CF_STS_INSERTED;
@@ -86,17 +86,17 @@ MPCF_ClearStatus
Tries to make the CF card go back to idle mode
bool return OUT: true if a CF card is idle
-----------------------------------------------------------------*/
-bool MPCF_ClearStatus (void)
+bool MPCF_ClearStatus (void)
{
int i;
-
+
// Wait until CF card is finished previous commands
i=0;
while ((MP_REG_CMD & CF_STS_BUSY) && (i < CARD_TIMEOUT))
{
i++;
}
-
+
// Wait until card is ready for commands
i = 0;
while ((!(MP_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT))
@@ -139,7 +139,7 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
{
i++;
}
-
+
// Wait until card is ready for commands
i = 0;
while ((!(MP_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT))
@@ -148,20 +148,20 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Set number of sectors to read
- MP_REG_SEC = numSecs;
-
+ MP_REG_SEC = numSecs;
+
// Set read sector
MP_REG_LBA1 = sector & 0xFF; // 1st byte of sector number
MP_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number
MP_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number
MP_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number
-
+
// Set command to read
MP_REG_CMD = CF_CMD_READ;
-
-
+
+
while (j--)
{
// Wait until card is ready for reading
@@ -172,7 +172,7 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Read data
#ifdef _CF_USE_DMA
#ifdef NDS
@@ -194,12 +194,12 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer)
}
} else {
while(i--)
- *buff++ = *MP_DATA;
+ *buff++ = *MP_DATA;
}
#else
i=256;
while(i--)
- *buff++ = *MP_DATA;
+ *buff++ = *MP_DATA;
#endif
}
#if (defined _CF_USE_DMA) && (defined NDS)
@@ -229,7 +229,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
u8 *buff_u8 = (u8*)buffer;
int temp;
#endif
-
+
#if defined _CF_USE_DMA && defined NDS && defined ARM9
DC_FlushRange( buffer, j * BYTE_PER_READ);
#endif
@@ -240,7 +240,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
{
i++;
}
-
+
// Wait until card is ready for commands
i = 0;
while ((!(MP_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT))
@@ -249,19 +249,19 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Set number of sectors to write
- MP_REG_SEC = numSecs;
-
+ MP_REG_SEC = numSecs;
+
// Set write sector
MP_REG_LBA1 = sector & 0xFF; // 1st byte of sector number
MP_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number
MP_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number
MP_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number
-
+
// Set command to write
MP_REG_CMD = CF_CMD_WRITE;
-
+
while (j--)
{
// Wait until card is ready for writing
@@ -272,7 +272,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
}
if (i >= CARD_TIMEOUT)
return false;
-
+
// Write data
#ifdef _CF_USE_DMA
#ifdef NDS
@@ -294,19 +294,19 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
}
} else {
while(i--)
- *MP_DATA = *buff++;
+ *MP_DATA = *buff++;
}
#else
i=256;
while(i--)
- *MP_DATA = *buff++;
+ *MP_DATA = *buff++;
#endif
}
#if defined _CF_USE_DMA && defined NDS
// Wait for end of transfer before returning
while(DMA3_CR & DMA_BUSY);
#endif
-
+
return true;
}
@@ -314,7 +314,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer)
MPCF_Shutdown
unload the GBAMP CF interface
-----------------------------------------------------------------*/
-bool MPCF_Shutdown(void)
+bool MPCF_Shutdown(void)
{
return MPCF_ClearStatus() ;
}
diff --git a/backends/platform/ds/arm9/source/fat/io_mpcf.h b/backends/platform/ds/arm9/source/fat/io_mpcf.h
index 58cab41b4c..8ec8859097 100644
--- a/backends/platform/ds/arm9/source/fat/io_mpcf.h
+++ b/backends/platform/ds/arm9/source/fat/io_mpcf.h
@@ -1,5 +1,5 @@
/*
- io_mpcf.h
+ io_mpcf.h
Hardware Routines for reading a compact flash card
using the GBA Movie Player
@@ -24,7 +24,7 @@ extern LPIO_INTERFACE MPCF_GetInterface(void) ;
#endif // define IO_MPCF_H
/*
- io_mpcf.h
+ io_mpcf.h
Hardware Routines for reading a compact flash card
using the GBA Movie Player
diff --git a/backends/platform/ds/arm9/source/fat/io_njsd.c b/backends/platform/ds/arm9/source/fat/io_njsd.c
index fbb223d560..12388da8e9 100644
--- a/backends/platform/ds/arm9/source/fat/io_njsd.c
+++ b/backends/platform/ds/arm9/source/fat/io_njsd.c
@@ -3,11 +3,11 @@
Hardware Routines for reading an SD card using
a NinjaDS SD adapter.
-
+
Original code supplied by NinjaMod
-
+
Copyright (c) 2006 Michael "Chishm" Chisholm
-
+
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
@@ -28,7 +28,7 @@
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
2006-08-05 - Chishm
* First release
*/
@@ -84,7 +84,7 @@ static u32 _NJSD_relativeCardAddress = 0;
static inline bool _NJSD_waitIRQ(void) {
/*#ifdef _NJSD_SYNC
int i = IRQ_TIMEOUT;
- while (!(REG_IF & 0x100000) && --i);
+ while (!(REG_IF & 0x100000) && --i);
REG_IF = 0x100000;
if (i <= 0) {
return false;
@@ -96,7 +96,7 @@ static inline bool _NJSD_waitIRQ(void) {
//if (!(REG_IME & 1))
//{
// irq's disabled...
- while (!(REG_IF & 0x100000) && (!(_NJSD_irqFlag)) && --i);
+ while (!(REG_IF & 0x100000) && (!(_NJSD_irqFlag)) && --i);
_NJSD_irqFlag = 0;
REG_IF = 0x100000;
if (i <= 0) {
@@ -106,7 +106,7 @@ static inline bool _NJSD_waitIRQ(void) {
}
//} else {
// irq's enabled
- // while (!(_NJSD_irqFlag) && --i);
+ // while (!(_NJSD_irqFlag) && --i);
// _NJSD_irqFlag = 0;
// REG_IF = 0x100000;
// if (i <= 0) {
@@ -118,8 +118,8 @@ static inline bool _NJSD_waitIRQ(void) {
//#endif
}
-static inline void _NJSD_writeCardCommand
- (u8 cmd0, u8 cmd1, u8 cmd2, u8 cmd3, u8 cmd4, u8 cmd5, u8 cmd6, u8 cmd7)
+static inline void _NJSD_writeCardCommand
+ (u8 cmd0, u8 cmd1, u8 cmd2, u8 cmd3, u8 cmd4, u8 cmd5, u8 cmd6, u8 cmd7)
{
CARD_COMMAND[0] = cmd0;
CARD_COMMAND[1] = cmd1;
@@ -142,7 +142,7 @@ static bool _NJSD_reset (void) {
if (i <= 0) {
return false;
}
-
+
return true;
}
@@ -179,7 +179,7 @@ static bool _NJSD_sendCMDR (int speed, u8 *rsp_buf, int type, u8 cmd, u32 param)
REG_IME = 0;
#endif
- REG_IE &= ~0x100000;
+ REG_IE &= ~0x100000;
REG_IF = 0x100000;
CARD_CR1H = CARD_CR1_ENABLE;
@@ -191,7 +191,7 @@ static bool _NJSD_sendCMDR (int speed, u8 *rsp_buf, int type, u8 cmd, u32 param)
} else {
CARD_COMMAND[0] = 0xF0 | (speed << 2) | 0 | (1 << 1);
}
-
+
CARD_COMMAND[1] = (type & 0x40) | ((( type >> 2) & 7) << 3);
CARD_COMMAND[2] = 0x40 | cmd;
CARD_COMMAND[3] = (param>>24) & 0xFF;
@@ -301,7 +301,7 @@ static bool _NJSD_writeSector (u8 *buffer, u8 *crc_buf, u32 offset) {
}
- REG_IE &= ~0x100000;
+ REG_IE &= ~0x100000;
REG_IF = 0x100000;
CARD_CR1H = CARD_CR1_ENABLE;
@@ -334,7 +334,7 @@ static bool _NJSD_writeSector (u8 *buffer, u8 *crc_buf, u32 offset) {
i++;
}
} while (CARD_CR2 & CARD_BUSY);
-
+
i = WRITE_TIMEOUT;
responseBuffer[3] = 0;
do {
@@ -352,7 +352,7 @@ static bool _NJSD_writeSector (u8 *buffer, u8 *crc_buf, u32 offset) {
#ifdef _NJSD_SYNC
REG_IME = old_REG_IME;
#endif
-
+
return true;
}
@@ -365,12 +365,12 @@ static bool _NJSD_sendCLK (int speed, int count) {
REG_IME = 0;
#endif
- REG_IE &= ~0x100000;
+ REG_IE &= ~0x100000;
REG_IF = 0x100000;
//CARD_CR1H = CARD_CR1_ENABLE; // | CARD_CR1_IRQ;
_NJSD_writeCardCommand (0xE0 | ((speed & 3) << 2), 0, (count - 1), 0, 0, 0, 0, 0);
-
+
CARD_CR2 = _NJSD_cardFlags;
i = COMMAND_TIMEOUT;
while ((CARD_CR2 & CARD_BUSY) && --i);
@@ -404,7 +404,7 @@ static bool _NJSD_sendCMDN (int speed, u8 cmd, u32 param) {
REG_IME = 0;
#endif
- REG_IE &= ~0x100000;
+ REG_IE &= ~0x100000;
REG_IF = 0x100000;
CARD_CR1H = CARD_CR1_ENABLE; // | CARD_CR1_IRQ;
@@ -438,22 +438,22 @@ static bool _NJSD_sendCMDN (int speed, u8 cmd, u32 param) {
static bool _NJSD_cardInit (void) {
u8 responseBuffer[17];
int i;
-
+
// If the commands succeed the first time, assume they'll always succeed
if (! _NJSD_sendCLK (SD_CLK_200KHz, 256) ) return false;
if (! _NJSD_sendCMDN (SD_CLK_200KHz, GO_IDLE_STATE, 0) ) return false;
_NJSD_sendCLK (SD_CLK_200KHz, 8);
-
+
_NJSD_sendCLK (SD_CLK_200KHz, 256);
_NJSD_sendCMDN (SD_CLK_200KHz, GO_IDLE_STATE, 0);
_NJSD_sendCLK (SD_CLK_200KHz, 8);
-
+
for (i = 0; i < MAX_STARTUP_TRIES ; i++) {
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, APP_CMD, 0);
- if (
+ if (
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SD_APP_OP_COND, SD_OCR_VALUE) &&
((responseBuffer[1] & 0x80) != 0))
- {
+ {
// Card is ready to receive commands now
break;
}
@@ -461,10 +461,10 @@ static bool _NJSD_cardInit (void) {
if (i >= MAX_STARTUP_TRIES) {
return false;
}
-
+
// The card's name, as assigned by the manufacturer
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_136, ALL_SEND_CID, 0);
-
+
// Get a new address
for (i = 0; i < MAX_STARTUP_TRIES ; i++) {
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SEND_RELATIVE_ADDR, 0);
@@ -479,17 +479,17 @@ static bool _NJSD_cardInit (void) {
// Some cards won't go to higher speeds unless they think you checked their capabilities
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_136, SEND_CSD, _NJSD_relativeCardAddress);
-
+
// Only this card should respond to all future commands
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SELECT_CARD, _NJSD_relativeCardAddress);
-
+
// Set a 4 bit data bus
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, APP_CMD, _NJSD_relativeCardAddress);
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SET_BUS_WIDTH, 2); // 4-bit mode.
// Use 512 byte blocks
_NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SET_BLOCKLEN, 512); // 512 byte blocks
-
+
return true;
}
@@ -521,7 +521,7 @@ bool _NJSD_startup(void) {
return false;
}
return true;
-}
+}
bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
@@ -531,7 +531,7 @@ bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) {
while (numSectors--) {
_SD_CRC16 ( data, BYTES_PER_READ, crc);
-
+
if (! _NJSD_writeSector (data, crc, offset)) {
return false;
}
@@ -549,7 +549,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
#ifdef _NJSD_SYNC
u32 old_REG_IME;
#endif
-
+
u8* tbuf = (u8*)buffer;
if (numSectors == 0) {
@@ -573,7 +573,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
if (!_NJSD_waitIRQ ()) {
#ifdef _NJSD_SYNC
REG_IME = old_REG_IME;
-#endif
+#endif
return false;
}
}
@@ -586,10 +586,10 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
if (!_NJSD_waitIRQ ()) {
#ifdef _NJSD_SYNC
REG_IME = old_REG_IME;
-#endif
+#endif
return false;
}
-
+
if (((int)buffer & 0x03) != 0){
cardPolledTransfer (0xA1406000, tmp, BYTES_PER_READ, (u8*)_NJSD_read_cmd);
memcpy (tbuf + (numSectors - 1) * BYTES_PER_READ, tmp, BYTES_PER_READ);
@@ -618,7 +618,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
#ifdef _NJSD_SYNC
u32 old_REG_IME;
#endif
-
+
u8* tbuf = (u8*)buffer;
if (numSectors == 0) {
@@ -637,7 +637,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
if (!_NJSD_waitIRQ ()) {
#ifdef _NJSD_SYNC
REG_IME = old_REG_IME;
-#endif
+#endif
return false;
}
}
@@ -645,10 +645,10 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) {
if (!_NJSD_waitIRQ ()) {
#ifdef _NJSD_SYNC
REG_IME = old_REG_IME;
-#endif
+#endif
return false;
}
-
+
cardPolledTransfer (0xA1406000, (u32*)(tbuf + (numSectors - 1) * BYTES_PER_READ), BYTES_PER_READ, (u8*)_NJSD_read_cmd);
} else {
_NJSD_sendCMDR (_NJSD_speed, NULL, SD_RSP_STREAM, READ_SINGLE_BLOCK, sector * BYTES_PER_READ);
@@ -678,4 +678,4 @@ LPIO_INTERFACE NJSD_GetInterface(void) {
} ;
#endif // defined NDS
-#endif \ No newline at end of file
+#endif
diff --git a/backends/platform/ds/arm9/source/fat/io_njsd.h b/backends/platform/ds/arm9/source/fat/io_njsd.h
index a297cda112..dce469cad6 100644
--- a/backends/platform/ds/arm9/source/fat/io_njsd.h
+++ b/backends/platform/ds/arm9/source/fat/io_njsd.h
@@ -1,11 +1,11 @@
/*
- io_njsd.h
+ io_njsd.h
Hardware Routines for reading an SD card using
a NinjaDS SD adapter.
Copyright (c) 2006 Michael "Chishm" Chisholm
-
+
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
diff --git a/backends/platform/ds/arm9/source/fat/io_nmmc.c b/backends/platform/ds/arm9/source/fat/io_nmmc.c
index a29c26e43a..261096a27b 100644
--- a/backends/platform/ds/arm9/source/fat/io_nmmc.c
+++ b/backends/platform/ds/arm9/source/fat/io_nmmc.c
@@ -13,10 +13,10 @@
project at chishm@hotmail.com
See gba_nds_fat.txt for help and license details.
-
+
2006-02-09 - www.neoflash.com:
* First stable release
-
+
2006-02-13 - Chishm
* Added ReadMK2Config function
* Added read config test to init function so no unnecessary card commands are sent
@@ -87,7 +87,7 @@ void Neo_WriteMK2Config(u8 config) {
Neo_EnableEEPROM(false);
}
-u8 Neo_ReadMK2Config(void)
+u8 Neo_ReadMK2Config(void)
{
u8 config;
Neo_EnableEEPROM(true);
@@ -104,7 +104,7 @@ u8 Neo_ReadMK2Config(void)
u8 selectMMC_command [8] = {0xFF, 0x00, 0x6A, 0xDF, 0x37, 0x59, 0x33, 0xA3};
-void Neo_SelectMMC (u8 dataByte)
+void Neo_SelectMMC (u8 dataByte)
{
selectMMC_command[1] = dataByte; // Set enable / disable byte
cardWriteCommand (selectMMC_command); // Send "5. Use the EEPROM CS to access the MK2 MMC/SD card"
@@ -154,12 +154,12 @@ bool Neo_CheckMMCResponse( u8 response, u8 mask ) {
bool Neo_InitMMC() {
Neo_MK2GameMode();
Neo_WriteMK2Config( MK2_CONFIG_ZIP_RAM_CLOSE | MK2_CONFIG_GAME_FLASH_CLOSE);
-
+
// Make sure the configuration was accepted
if (Neo_ReadMK2Config() != (MK2_CONFIG_ZIP_RAM_CLOSE | MK2_CONFIG_GAME_FLASH_CLOSE)) {
return false; // If not, then it wasn't initialised properly
}
-
+
return true;
}
@@ -167,7 +167,7 @@ bool Neo_InitMMC() {
bool NMMC_IsInserted(void) {
int i;
-
+
Neo_EnableMMC( true ); // Open SPI port to MMC card
Neo_SendMMCCommand(MMC_SEND_CSD, 0);
if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured
@@ -183,13 +183,13 @@ bool NMMC_IsInserted(void) {
for (i = 0; i < 28; i++) {
Neo_SPI(0xff);
}
-
+
return true;
}
bool NMMC_ClearStatus (void) {
u32 i;
-
+
Neo_EnableMMC( true ); // Open SPI port to MMC card
for (i = 0; i < 10; i++) {
Neo_SPI(0xFF); // Send 10 0xFF bytes to MMC card
@@ -224,14 +224,14 @@ bool NMMC_StartUp(void) {
return false;
}
Neo_EnableMMC( true ); // Open SPI port to MMC card
-
+
// Set block length
Neo_SendMMCCommand(MMC_SET_BLOCKLEN, BYTE_PER_READ );
if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured
Neo_EnableMMC( false );
return false;
}
-
+
// Check if we can use a higher SPI frequency
Neo_SendMMCCommand(MMC_SEND_CSD, 0);
if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured
@@ -252,77 +252,77 @@ bool NMMC_StartUp(void) {
if ((transSpeed & 0xf0) >= 0x30) {
spi_freq = 0;
}
-
+
Neo_EnableMMC( false );
return true;
-}
+}
-bool NMMC_WriteSectors (u32 sector, u8 numSecs, void* buffer)
+bool NMMC_WriteSectors (u32 sector, u8 numSecs, void* buffer)
{
u32 i;
u8 *p=buffer;
-
+
int totalSecs = (numSecs == 0) ? 256 : numSecs;
sector *= BYTE_PER_READ;
-
+
Neo_EnableMMC( true ); // Open SPI port to MMC card
Neo_SendMMCCommand( 25, sector );
if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured
Neo_EnableMMC( false );
return false;
}
-
+
while (totalSecs--) {
Neo_SPI( 0xFC ); // Send Start Block token
for( i = 0; i < BYTE_PER_READ; i++ ) // Send a block of data
Neo_SPI( *p++ );
Neo_SPI( 0xFF ); // Send fake CRC16
Neo_SPI( 0xFF ); // Send fake CRC16
-
+
if( ( Neo_SPI( 0xFF ) & 0x0F ) != 0x05 ) { // Make sure the block was accepted
Neo_EnableMMC( false );
return false;
}
while( Neo_SPI( 0xFF ) == 0x00 ); // Wait for the block to be written
}
-
+
// Stop transmission block
Neo_SPI( 0xFD ); // Send Stop Transmission Block token
for( i = 0; i < BYTE_PER_READ; i++ ) // Send a block of fake data
Neo_SPI( 0xFF );
Neo_SPI( 0xFF ); // Send fake CRC16
Neo_SPI( 0xFF ); // Send fake CRC16
-
+
Neo_SPI (0xFF); // Send 8 clocks
while( Neo_SPI( 0xFF ) == 0x00 ); // Wait for the busy signal to clear
-
- for ( i = 0; i < 0x10; i++) {
+
+ for ( i = 0; i < 0x10; i++) {
Neo_SPI (0xFF); // Send clocks for the MMC card to finish what it's doing
}
-
+
Neo_EnableMMC( false ); // Close SPI port to MMC card
return true;
}
-bool NMMC_ReadSectors (u32 sector, u8 numSecs, void* buffer)
+bool NMMC_ReadSectors (u32 sector, u8 numSecs, void* buffer)
{
u32 i;
u8 *p=buffer;
-
+
int totalSecs = (numSecs == 0) ? 256 : numSecs;
sector *= BYTE_PER_READ;
-
+
Neo_EnableMMC( true ); // Open SPI port to MMC card
-
+
while (totalSecs--) {
Neo_SendMMCCommand(MMC_READ_BLOCK, sector );
if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured
Neo_EnableMMC( false );
return false;
}
-
+
if( Neo_CheckMMCResponse( 0xFE, 0xFF ) == false ) { // Check for Start Block token
Neo_EnableMMC( false );
return false;
@@ -333,7 +333,7 @@ bool NMMC_ReadSectors (u32 sector, u8 numSecs, void* buffer)
Neo_SPI( 0xFF ); // Ignore CRC16
sector += BYTE_PER_READ;
}
-
+
Neo_EnableMMC( false ); // Close SPI port to MMC card
return true;
}
diff --git a/backends/platform/ds/arm9/source/fat/io_nmmc.h b/backends/platform/ds/arm9/source/fat/io_nmmc.h
index 5244d21868..0249e3a864 100644
--- a/backends/platform/ds/arm9/source/fat/io_nmmc.h
+++ b/backends/platform/ds/arm9/source/fat/io_nmmc.h
@@ -1,5 +1,5 @@
/*
- io_NMMC.h
+ io_NMMC.h
Hardware Routines for reading an SD or MMC card using
a Neoflash MK2 or MK3.
@@ -26,7 +26,7 @@ extern LPIO_INTERFACE NMMC_GetInterface(void) ;
#endif // define IO_NMMC_H
/*
- io_NMMC.h
+ io_NMMC.h
Hardware Routines for reading an SD or MMC card using
a Neoflash MK2 or MK3.
diff --git a/backends/platform/ds/arm9/source/fat/io_sccf.c b/backends/platform/ds/arm9/source/fat/io_sccf.c
index 0c77f4673c..bda628fdaa 100644
--- a/backends/platform/ds/arm9/source/fat/io_sccf.c
+++ b/backends/platform/ds/arm9/source/fat/io_sccf.c
@@ -57,7 +57,7 @@ bool SCCF_Unlock(void)
temp = (~temp & 0xFF);
return (CF_REG_LBA1 == temp);
#undef CF_REG_LBA1
-}
+}
bool SCCF_Shutdown(void) {
return MPCF_ClearStatus() ;
diff --git a/backends/platform/ds/arm9/source/fat/io_sccf.h b/backends/platform/ds/arm9/source/fat/io_sccf.h
index 961909fbce..2270c4eab1 100644
--- a/backends/platform/ds/arm9/source/fat/io_sccf.h
+++ b/backends/platform/ds/arm9/source/fat/io_sccf.h
@@ -1,5 +1,5 @@
/*
- io_sccf.h
+ io_sccf.h
Hardware Routines for reading a compact flash card
using the Supercard CF
@@ -24,7 +24,7 @@ extern LPIO_INTERFACE SCCF_GetInterface(void) ;
#endif // define IO_SCCF_H
/*
- io_sccf.h
+ io_sccf.h
Hardware Routines for reading a compact flash card
using the Supercard CF
diff --git a/backends/platform/ds/arm9/source/fat/io_scsd.c b/backends/platform/ds/arm9/source/fat/io_scsd.c
index 9359fefb6d..270691436d 100644
--- a/backends/platform/ds/arm9/source/fat/io_scsd.c
+++ b/backends/platform/ds/arm9/source/fat/io_scsd.c
@@ -1,8 +1,8 @@
/*
io_scsd.c by SaTa.
based on io_sccf.c
-
-
+
+
*/
/*
@@ -43,7 +43,7 @@ extern void InitSCMode(void); // CF‚Æ“¯‚¶
extern void ReadSector(u16 *buff,u32 sector,u8 ReadNumber);
extern void WriteSector(u16 *buff,u32 sector,u8 writeNumber);
extern bool MemoryCard_IsInserted(void); // CF‚ƈႤ
-//
+//
/*-----------------------------------------------------------------
SCSD_Unlock
@@ -55,7 +55,7 @@ bool SCSD_Unlock(void)
{
InitSCMode();
return MemoryCard_IsInserted();
-}
+}
bool SCSD_Shutdown(void) {
return MPCF_ClearStatus() ;
@@ -103,4 +103,4 @@ LPIO_INTERFACE SCSD_GetInterface(void) {
return &io_scsd ;
} ;
-#endif \ No newline at end of file
+#endif
diff --git a/backends/platform/ds/arm9/source/fat/io_scsd.h b/backends/platform/ds/arm9/source/fat/io_scsd.h
index 75115b8d62..492492f619 100644
--- a/backends/platform/ds/arm9/source/fat/io_scsd.h
+++ b/backends/platform/ds/arm9/source/fat/io_scsd.h
@@ -1,12 +1,12 @@
/*
io_scsd.h by SaTa.
based on io_sccf.h
-
-
+
+
*/
/*
- io_sccf.h
+ io_sccf.h
Hardware Routines for reading a compact flash card
using the GBA Movie Player
@@ -26,4 +26,4 @@
// export interface
extern LPIO_INTERFACE SCSD_GetInterface(void) ;
-#endif // define IO_SCSD_H \ No newline at end of file
+#endif // define IO_SCSD_H
diff --git a/backends/platform/ds/arm9/source/fat/io_scsd_asm.s b/backends/platform/ds/arm9/source/fat/io_scsd_asm.s
index 498cbb96c2..390d36afeb 100644
--- a/backends/platform/ds/arm9/source/fat/io_scsd_asm.s
+++ b/backends/platform/ds/arm9/source/fat/io_scsd_asm.s
@@ -1,22 +1,22 @@
.TEXT
@--------------------------------sd data--------------------------------
.equ sd_comadd,0x9800000
-.equ sd_dataadd,0x9000000
+.equ sd_dataadd,0x9000000
.equ sd_dataradd,0x9100000
@-----------------viod sd_data_write_s(u16 *buff,u16* crc16buff)-------------------
.ALIGN
- .GLOBAL sd_data_write_s
+ .GLOBAL sd_data_write_s
.CODE 32
sd_data_write_s:
stmfd r13!,{r4-r5}
mov r5,#512
mov r2,#sd_dataadd
sd_data_write_busy:
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
beq sd_data_write_busy
- ldrh r3,[r2]
+ ldrh r3,[r2]
mov r3,#0 @star bit
strh r3,[r2]
@@ -24,10 +24,10 @@ sd_data_write_loop:
ldrh r3,[r0],#2
add r3,r3,r3,lsl #20
mov r4,r3,lsl #8
- stmia r2,{r3-r4}
-
- subs r5, r5, #2
- bne sd_data_write_loop
+ stmia r2,{r3-r4}
+
+ subs r5, r5, #2
+ bne sd_data_write_loop
cmp r1,#0
movne r0,r1
@@ -38,11 +38,11 @@ sd_data_write_loop:
mov r3,#0xff @end bit
strh r3,[r2]
sd_data_write_loop2:
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
bne sd_data_write_loop2
- ldmia r2,{r3-r4}
+ ldmia r2,{r3-r4}
ldmfd r13!,{r4-r5}
bx r14
@@ -50,7 +50,7 @@ sd_data_write_loop2:
@----------void sd_data_read_s(u16 *buff)-------------
.ALIGN
- .GLOBAL sd_data_read_s
+ .GLOBAL sd_data_read_s
.CODE 32
sd_data_read_s:
stmfd r13!,{r4}
@@ -61,62 +61,62 @@ sd_data_read_loop1:
bne sd_data_read_loop1
mov r2,#512
sd_data_read_loop:
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- subs r2, r2, #16
- bne sd_data_read_loop
+ subs r2, r2, #16
+ bne sd_data_read_loop
ldmia r1,{r3-r4} @crc 16
- ldmia r1,{r3-r4}
- ldmia r1,{r3-r4}
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
ldrh r3,[r1] @end bit
- ldmfd r13!,{r4}
+ ldmfd r13!,{r4}
bx r14
@----------end sd_data_read_s-------------
@------void sd_com_crc16_s(u16* buff,u16 num,u16* crc16buff)
.ALIGN
- .GLOBAL sd_crc16_s
+ .GLOBAL sd_crc16_s
.CODE 32
sd_crc16_s:
stmfd r13!,{r4-r9}
mov r9,r2
- mov r3,#0
- mov r4,#0
- mov r5,#0
- mov r6,#0
+ mov r3,#0
+ mov r4,#0
+ mov r5,#0
+ mov r6,#0
ldr r7,=0x80808080
ldr r8,=0x1021
@@ -131,19 +131,19 @@ sd_crc16_loop:
eorne r3,r3,r8
tst r2,r7,lsr #24
eorne r3,r3,r8
-
+
mov r4,r4,lsl #1
tst r4,#0x10000
eorne r4,r4,r8
tst r2,r7,lsr #25
eorne r4,r4,r8
-
+
mov r5,r5,lsl #1
tst r5,#0x10000
eorne r5,r5,r8
tst r2,r7,lsr #26
eorne r5,r5,r8
-
+
mov r6,r6,lsl #1
tst r6,#0x10000
eorne r6,r6,r8
@@ -152,7 +152,7 @@ sd_crc16_loop:
mov r7,r7,ror #4
subs r1,r1,#4
- bne sd_crc16_loop
+ bne sd_crc16_loop
mov r2,r9
mov r8,#16
@@ -184,7 +184,7 @@ sd_crc16_write_data:
@--------------u8 sd_crc7_s(u16* buff,u16 num)----------------------------
.ALIGN
- .GLOBAL sd_crc7_s
+ .GLOBAL sd_crc7_s
.CODE 32
sd_crc7_s:
stmfd r13!,{r4}
@@ -206,7 +206,7 @@ sd_crc7_loop:
mov r4,r4,ror #1
subs r1,r1,#1
- bne sd_crc7_loop
+ bne sd_crc7_loop
mov r3,r3,lsl #1
add r0,r3,#1
@@ -216,7 +216,7 @@ sd_crc7_loop:
@--------------sd_com_read_s(u16* buff,u32 num)------------------
.ALIGN
- .GLOBAL sd_com_read_s
+ .GLOBAL sd_com_read_s
.CODE 32
sd_com_read_s:
@@ -229,8 +229,8 @@ sd_com_read_loop1:
sd_com_read_loop:
ldmia r2,{r3-r6}
- subs r1, r1, #1
- bne sd_com_read_loop
+ subs r1, r1, #1
+ bne sd_com_read_loop
ldmfd r13!,{r4-r6}
bx r14
@--------------end sd_com_read_s------------------
@@ -242,14 +242,14 @@ sd_com_read_loop:
.CODE 32
sd_com_write_s:
stmfd r13!,{r4-r6}
-
+
mov r2,#sd_comadd
sd_com_write_busy:
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x1
beq sd_com_write_busy
- ldrh r3,[r2]
+ ldrh r3,[r2]
sd_com_write_loop:
ldrb r3,[r0],#1
@@ -257,9 +257,9 @@ sd_com_write_loop:
mov r4,r3,lsl #2
mov r5,r4,lsl #2
mov r6,r5,lsl #2
- stmia r2,{r3-r6}
- subs r1, r1, #1
- bne sd_com_write_loop
+ stmia r2,{r3-r6}
+ subs r1, r1, #1
+ bne sd_com_write_loop
ldmfd r13!,{r4-r6}
bx r14
@@ -267,7 +267,7 @@ sd_com_write_loop:
@-----------------void send_clk(u32 num)---------
.ALIGN
- .GLOBAL send_clk
+ .GLOBAL send_clk
.CODE 32
send_clk:
@@ -281,7 +281,7 @@ send_clk_loop1:
@---------------------------void SDCommand(u8 command,u8 num,u32 sector)--------------------
.ALIGN
- .GLOBAL SDCommand
+ .GLOBAL SDCommand
.CODE 32
@void SDCommand(u8 command,u8 num,u32 sector )
@{
@@ -338,12 +338,12 @@ SDCommand:
@ register u16 i,j;
@ i=readnum;
@ sectno<<=9;
-@ SDCommand(18,0,sector);
+@ SDCommand(18,0,sector);
@ for (j=0;j<i ; j++)
@ {
@ sd_data_read_s((u32)buff+j*512);
@ }
-@ SDCommand(12,0,0);
+@ SDCommand(12,0,0);
@ get_resp();
@ send_clk(0x10);
@
@@ -363,7 +363,7 @@ beginforj_ReadSector:
cmp r6,r5
bge endforj_ReadSector
mov r0,r4
- add r0,r0,r6,lsl #9
+ add r0,r0,r6,lsl #9
bl sd_data_read_s
add r6,r6,#1
b beginforj_ReadSector
@@ -408,17 +408,17 @@ get_resp:
@
@ sectno<<=9;
@
-@ SDCommand(25,0,sector);
+@ SDCommand(25,0,sector);
@ get_resp();
-@ send_clk(0x10);
+@ send_clk(0x10);
@
@ for (j=0;j<i ; j++)
@ {
@ sd_crc16_s((u32)(u32)buff+j*512,512,(u32)crc16);
@ sd_data_write_s((u32)buff+j*512,(u32)crc16);
-@ send_clk(0x10);
+@ send_clk(0x10);
@ }
-@ SDCommand(12,0,0);
+@ SDCommand(12,0,0);
@ get_resp();
@ send_clk(0x10);
@ while((*(u16*)sd_dataadd &0x0100)==0);
@@ -451,7 +451,7 @@ beginforj_WriteSector:
add r2,r13,#4
bl sd_crc16_s
mov r0,r4
- add r0,r0,r6,lsl #9
+ add r0,r0,r6,lsl #9
add r1,r13,#4
bl sd_data_write_s
mov r0,#0x10
@@ -481,7 +481,7 @@ beginwhile_WriteSector:
.GLOBAL InitSCMode
.CODE 32
InitSCMode:
- mvn r0,#0x0F6000000
+ mvn r0,#0x0F6000000
sub r0,r0,#0x01
mov r1,#0x0A500
add r1,r1,#0x5A
diff --git a/backends/platform/ds/arm9/source/fat/io_sd_common.c b/backends/platform/ds/arm9/source/fat/io_sd_common.c
index 0a38e6277c..ade9df0d80 100644
--- a/backends/platform/ds/arm9/source/fat/io_sd_common.c
+++ b/backends/platform/ds/arm9/source/fat/io_sd_common.c
@@ -5,10 +5,10 @@
Common SD card routines
- SD routines partially based on sd.s by Romman
+ SD routines partially based on sd.s by Romman
Copyright (c) 2006 Michael "Chishm" Chisholm
-
+
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
@@ -29,7 +29,7 @@
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
+
2006-08-07 - Chishm
* Moved the SD initialization to a common function
* Increased timeouts for slower cards
@@ -61,10 +61,10 @@ u8 _SD_CRC7(u8* data, int cnt) {
}
crc = (crc << 1) | 1;
return(crc);
-}
+}
/*
-Calculates the CRC16 for a sector of data. Calculates it
+Calculates the CRC16 for a sector of data. Calculates it
as 4 separate lots, merged into one buffer. This is used
for 4 SD data lines, not for 1 data line alone.
*/
@@ -79,53 +79,53 @@ void _SD_CRC16 (u8* buff, int buffLength, u8* crc16buff) {
b = 0; // r4
c = 0; // r5
d = 0; // r6
-
+
buffLength = buffLength * 8;
-
-
+
+
do {
if (bitPattern & 0x80) dataByte = *buff++;
-
+
a = a << 1;
if ( a & 0x10000) a ^= crcConst;
if (dataByte & (bitPattern >> 24)) a ^= crcConst;
-
+
b = b << 1;
if (b & 0x10000) b ^= crcConst;
if (dataByte & (bitPattern >> 25)) b ^= crcConst;
-
+
c = c << 1;
if (c & 0x10000) c ^= crcConst;
if (dataByte & (bitPattern >> 26)) c ^= crcConst;
-
+
d = d << 1;
if (d & 0x10000) d ^= crcConst;
if (dataByte & (bitPattern >> 27)) d ^= crcConst;
-
+
bitPattern = (bitPattern >> 4) | (bitPattern << 28);
} while (buffLength-=4);
-
+
count = 16; // r8
-
+
do {
bitPattern = bitPattern << 4;
if (a & 0x8000) bitPattern |= 8;
if (b & 0x8000) bitPattern |= 4;
if (c & 0x8000) bitPattern |= 2;
if (d & 0x8000) bitPattern |= 1;
-
+
a = a << 1;
b = b << 1;
c = c << 1;
d = d << 1;
-
+
count--;
-
+
if (!(count & 0x01)) {
*crc16buff++ = (u8)(bitPattern & 0xff);
}
} while (count != 0);
-
+
return;
}
@@ -136,20 +136,20 @@ cmd_17byte_response: a pointer to a function that sends the SD card a command an
use4bitBus: initialise card to use a 4 bit data bus when communicating with the card
RCA: a pointer to the location to store the card's Relative Card Address, preshifted up by 16 bits.
*/
-bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
+bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
_SD_FN_CMD_17BYTE_RESPONSE cmd_17byte_response,
bool use4bitBus,
u32 *RCA)
{
u8 responseBuffer[17] = {0};
int i;
-
+
for (i = 0; i < MAX_STARTUP_TRIES ; i++) {
cmd_6byte_response (responseBuffer, APP_CMD, 0);
- if (
+ if (
cmd_6byte_response (responseBuffer, SD_APP_OP_COND, SD_OCR_VALUE) &&
((responseBuffer[1] & 0x80) != 0))
- {
+ {
// Card is ready to receive commands now
break;
}
@@ -157,10 +157,10 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
if (i >= MAX_STARTUP_TRIES) {
return false;
}
-
+
// The card's name, as assigned by the manufacturer
cmd_17byte_response (responseBuffer, ALL_SEND_CID, 0);
-
+
// Get a new address
for (i = 0; i < MAX_STARTUP_TRIES ; i++) {
cmd_6byte_response (responseBuffer, SEND_RELATIVE_ADDR, 0);
@@ -175,10 +175,10 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
// Some cards won't go to higher speeds unless they think you checked their capabilities
cmd_17byte_response (responseBuffer, SEND_CSD, *RCA);
-
+
// Only this card should respond to all future commands
cmd_6byte_response (responseBuffer, SELECT_CARD, *RCA);
-
+
if (use4bitBus) {
// Set a 4 bit data bus
cmd_6byte_response (responseBuffer, APP_CMD, *RCA);
@@ -187,7 +187,7 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
// Use 512 byte blocks
cmd_6byte_response (responseBuffer, SET_BLOCKLEN, 512); // 512 byte blocks
-
+
// Wait until card is ready for data
i = 0;
do {
@@ -196,7 +196,7 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
}
i++;
} while (!cmd_6byte_response (responseBuffer, SEND_STATUS, *RCA) && ((responseBuffer[3] & 0x1f) != ((SD_STATE_TRAN << 1) | READY_FOR_DATA)));
-
+
return true;
}
diff --git a/backends/platform/ds/arm9/source/fat/io_sd_common.h b/backends/platform/ds/arm9/source/fat/io_sd_common.h
index 09abffab39..8962d88890 100644
--- a/backends/platform/ds/arm9/source/fat/io_sd_common.h
+++ b/backends/platform/ds/arm9/source/fat/io_sd_common.h
@@ -8,7 +8,7 @@
SD routines partially based on sd.s by Romman
Copyright (c) 2006 Michael "Chishm" Chisholm
-
+
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
@@ -32,7 +32,7 @@
2006-07-11 - Chishm
* Original release
-
+
2006-07-28 - Chishm
* Changed voltage range that the SD card can use
*/
@@ -76,7 +76,7 @@
#define SD_STATE_IDENT 2 // Identification state, after ALL_SEND_CID
#define SD_STATE_STBY 3 // Standby state, when card is deselected
#define SD_STATE_TRAN 4 // Transfer state, after card is selected and ready for data transfer
-#define SD_STATE_DATA 5 //
+#define SD_STATE_DATA 5 //
#define SD_STATE_RCV 6 // Receive data state
#define SD_STATE_PRG 7 // Programming state
#define SD_STATE_DIS 8 // Disconnect state
@@ -85,7 +85,7 @@
#define READY_FOR_DATA 1 // bit 8 in card status
/*
-Calculate the CRC7 of a command and return it preshifted with
+Calculate the CRC7 of a command and return it preshifted with
an end bit added
*/
extern u8 _SD_CRC7(u8* data, int size);
@@ -106,7 +106,7 @@ cmd_17byte_response: a pointer to a function that sends the SD card a command an
use4bitBus: initialise card to use a 4 bit data bus when communicating with the card
RCA: a pointer to the location to store the card's Relative Card Address, preshifted up by 16 bits.
*/
-extern bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
+extern bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response,
_SD_FN_CMD_17BYTE_RESPONSE cmd_17byte_response,
bool use4bitBus,
u32 *RCA);
diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp
index b03a1334f7..fbe0c69944 100644
--- a/backends/platform/ds/arm9/source/gbampsave.cpp
+++ b/backends/platform/ds/arm9/source/gbampsave.cpp
@@ -92,40 +92,40 @@ uint32 GBAMPSaveFile::write(const void *buf, uint32 size) {
memcpy(buffer + bufferPos, buf, size);
bufferPos += size;
-
+
saveSize += size;
/* int pos = 0;
-
+
int rest = SAVE_BUFFER_SIZE - bufferPos;
memcpy(buffer + bufferPos, buf, rest);
bufferPos = 512;
pos += rest;
- flushSaveBuffer();
+ flushSaveBuffer();
size -= rest;
// consolePrintf("First section: %d\n", rest);
-
+
while (size >= 512) {
DS::std_fwrite(((char *) (buf)) + pos, 1, 512, handle);
size -= 512;
pos += 512;
// consolePrintf("Full chunk, %d left ", size);
}
-
+
bufferPos = 0;
memcpy(buffer + bufferPos, ((char *) (buf)) + pos, size);
bufferPos += size;
// consolePrintf("%d left in buffer ", bufferPos);*/
-
+
} else {
-
+
memcpy(buffer + bufferPos, buf, size);
bufferPos += size;
-
+
saveSize += size;
}
-
+
// if ((size > 100) || (size <= 0)) consolePrintf("Write %d bytes\n", size);
return size;
}
@@ -145,41 +145,41 @@ GBAMPSaveFileManager::~GBAMPSaveFileManager() {
GBAMPSaveFile* GBAMPSaveFileManager::openSavefile(char const* name, bool saveOrLoad) {
char fileSpec[128];
-
+
strcpy(fileSpec, getSavePath());
-
+
if (fileSpec[strlen(fileSpec) - 1] == '/') {
sprintf(fileSpec, "%s%s", getSavePath(), name);
} else {
sprintf(fileSpec, "%s/%s", getSavePath(), name);
}
-
+
// consolePrintf(fileSpec);
GBAMPSaveFile* sf = new GBAMPSaveFile(fileSpec, saveOrLoad);
if (sf->isOpen()) {
- return sf;
+ return sf;
} else {
delete sf;
- return NULL;
+ return NULL;
}
}
-Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) {
+Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) {
enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 };
char name[256];
-
+
DS::std_cwd((char *) getSavePath());
// consolePrintf("Save path: '%s', pattern: '%s'\n", getSavePath(),pattern);
-
+
int fileType = FAT_FindFirstFileLFN(name);
Common::StringList list;
-
-
+
+
do {
-
+
if (fileType == TYPE_FILE) {
FAT_GetLongFilename(name);
@@ -187,18 +187,18 @@ Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) {
for (int r = 0; r < strlen(name); r++) {
name[r] = tolower(name[r]);
}
-
-
+
+
if (Common::matchString(name, pattern)) {
list.push_back(name);
}
}
} while ((fileType = FAT_FindNextFileLFN(name)));
-
+
FAT_chdir("/");
return list;
-}
+}
diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h
index b46c9bd53b..40dcde0b26 100644
--- a/backends/platform/ds/arm9/source/gbampsave.h
+++ b/backends/platform/ds/arm9/source/gbampsave.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _GBAMPSAVE_H_
#define _GBAMPSAVE_H_
@@ -39,19 +39,19 @@ class GBAMPSaveFile : public Common::InSaveFile, public Common::OutSaveFile {
public:
GBAMPSaveFile(char* name, bool saveOrLoad);
virtual ~GBAMPSaveFile();
-
+
virtual uint32 read(void *buf, uint32 size);
virtual uint32 write(const void *buf, uint32 size);
-
+
virtual bool eos() const;
virtual void skip(uint32 bytes);
virtual uint32 pos() const;
virtual uint32 size() const;
virtual void seek(int32 pos, int whence);
-
+
void flushSaveBuffer();
-
+
virtual bool isOpen() const {
return handle != 0;
}
@@ -62,17 +62,17 @@ class GBAMPSaveFileManager : public DefaultSaveFileManager {
public:
GBAMPSaveFileManager();
~GBAMPSaveFileManager();
-
+
// static GBAMPSaveFileManager* instance() { return instancePtr; }
GBAMPSaveFile *openSavefile(const char *filename, bool saveOrLoad);
-
+
virtual Common::OutSaveFile* openForSaving(const char* filename) { return openSavefile(filename, true); }
virtual Common::InSaveFile* openForLoading(const char* filename) { return openSavefile(filename, false); }
-
+
virtual bool removeSavefile(const char *filename) { return false; } // TODO: Implement this
virtual Common::StringList listSavefiles(const char *pattern);
-
+
void deleteFile(char* name);
void listFiles();
};
diff --git a/backends/platform/ds/arm9/source/keys.cpp b/backends/platform/ds/arm9/source/keys.cpp
index dcec2287b9..8bfc983565 100644
--- a/backends/platform/ds/arm9/source/keys.cpp
+++ b/backends/platform/ds/arm9/source/keys.cpp
@@ -27,26 +27,26 @@
$Log: keys.c,v $
Revision 1.13 2006/01/12 09:10:47 wntrmute
Added key repeat as suggested by pepsiman
-
+
Revision 1.12 2005/11/27 12:30:25 wntrmute
reverted to correct hardware REGisters
-
+
Revision 1.11 2005/11/27 07:48:45 joatski
Renamed REG_KEYINPUT and REG_KEYCNT back to KEYS and KEYS_CR, as the alternatives are defined in registers_alt.h.
Changed function returns to uint32
-
+
Revision 1.10 2005/11/03 23:38:49 wntrmute
don't use enum for key function returns
-
+
Revision 1.9 2005/10/13 16:30:11 dovoto
Changed KEYPAD_BITS to a typedef enum, this resolved some issues with multiple redefinition of KEYPAD_BITS (although this error did not allways occur).
-
+
Revision 1.8 2005/10/03 21:21:59 wntrmute
use enum types
-
+
Revision 1.7 2005/09/07 18:06:27 wntrmute
use new register names
-
+
Revision 1.6 2005/08/23 17:06:10 wntrmute
converted all endings to unix
@@ -148,4 +148,4 @@ uint32 keysUp(void) {
}
-} // namespace ds \ No newline at end of file
+} // namespace ds
diff --git a/backends/platform/ds/arm9/source/libcartreset/cartreset.c b/backends/platform/ds/arm9/source/libcartreset/cartreset.c
index 01ba33736a..6fb906b86d 100644
--- a/backends/platform/ds/arm9/source/libcartreset/cartreset.c
+++ b/backends/platform/ds/arm9/source/libcartreset/cartreset.c
@@ -43,7 +43,7 @@ bool cartSetMenuMode(u32 _deviceType)
tmp = *(vu16*)(0x08800612);
tmp = *(vu16*)(0x08000000);
tmp = *(vu16*)(0x08801B66);
- tmp = *(vu16*)(0x08000000 + (mode << 1));
+ tmp = *(vu16*)(0x08000000 + (mode << 1));
tmp = *(vu16*)(0x0800080E);
tmp = *(vu16*)(0x08000000);
diff --git a/backends/platform/ds/arm9/source/libcartreset/cartreset_nolibfat.h b/backends/platform/ds/arm9/source/libcartreset/cartreset_nolibfat.h
index 6a3f045840..ddc4b1d4c2 100644
--- a/backends/platform/ds/arm9/source/libcartreset/cartreset_nolibfat.h
+++ b/backends/platform/ds/arm9/source/libcartreset/cartreset_nolibfat.h
@@ -53,5 +53,5 @@ void cartExecute();
}
#endif
-#endif
+#endif
diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp
index 455327f530..2044448923 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.cpp
+++ b/backends/platform/ds/arm9/source/osystem_ds.cpp
@@ -63,7 +63,7 @@ int OSystem_DS::timerHandler(int t)
tm->handler();
return t;
}
-
+
void OSystem_DS::initBackend() {
ConfMan.setInt("autosave_period", 0);
ConfMan.setBool("FM_medium_quality", true);
@@ -72,7 +72,7 @@ void OSystem_DS::initBackend() {
_timer = new DSTimerManager;
DS::setSoundProc(Audio::Mixer::mixCallback, _mixer);
DS::setTimerCallback(&OSystem_DS::timerHandler, 10);
-
+
OSystem::initBackend();
}
@@ -135,20 +135,20 @@ void OSystem_DS::setPalette(const byte *colors, uint start, uint num) {
int red = *colors;
int green = *(colors + 1);
int blue = *(colors + 2);
-
+
red >>= 3;
green >>= 3;
blue >>= 3;
-
+
// if (r != 255)
- {
+ {
BG_PALETTE[r] = red | (green << 5) | (blue << 10);
if (!DS::getKeyboardEnable()) {
BG_PALETTE_SUB[r] = red | (green << 5) | (blue << 10);
}
}
// if (num == 16) consolePrintf("pal:%d r:%d g:%d b:%d\n", r, red, green, blue);
-
+
colors += 4;
}
}
@@ -157,7 +157,7 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) {
surf->create(DS::getGameWidth(), DS::getGameHeight(), 1);
// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
-
+
u16* image = (u16 *) DS::get8BitBackBuffer();
for (int y = 0; y < DS::getGameHeight(); y++)
@@ -174,7 +174,7 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) {
void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {
// consolePrintf("Grabpalette");
-
+
for (unsigned int r = start; r < start + num; r++) {
*colors++ = (BG_PALETTE[r] & 0x001F) << 3;
*colors++ = (BG_PALETTE[r] & 0x03E0) >> 5 << 3;
@@ -186,47 +186,47 @@ void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) {
void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h)
{
// consolePrintf("Copy rect %d, %d %d, %d ", x, y, w, h);
-
+
if (w <= 1) return;
if (h < 0) return;
if (!DS::getIsDisplayMode8Bit()) return;
-
+
u16* bgSub = (u16 *) BG_GFX_SUB;
u16* bg = (u16 *) DS::get8BitBackBuffer();
u16* src = (u16 *) buf;
-
+
if (DS::getKeyboardEnable()) {
-
+
for (int dy = y; dy < y + h; dy++) {
u16* dest = bg + (dy << 8) + (x >> 1);
-
+
DC_FlushRange(src, w << 1);
DC_FlushRange(dest, w << 1);
dmaCopyHalfWords(3, src, dest, w);
-
+
src += pitch >> 1;
}
-
+
} else {
for (int dy = y; dy < y + h; dy++) {
u16* dest1 = bg + (dy << 8) + (x >> 1);
u16* dest2 = bgSub + (dy << 8) + (x >> 1);
-
+
DC_FlushRange(src, w << 1);
DC_FlushRange(dest1, w << 1);
DC_FlushRange(dest2, w << 1);
-
+
dmaCopyHalfWords(3, src, dest1, w);
dmaCopyHalfWords(3, src, dest2, w);
-
+
src += pitch >> 1;
}
}
-
+
// consolePrintf("Done\n");
-
-
-
+
+
+
}
void OSystem_DS::updateScreen()
@@ -236,7 +236,7 @@ void OSystem_DS::updateScreen()
{
// Copy temp framebuffer back to screen
copyRectToScreen((byte *)_framebuffer.pixels, _framebuffer.pitch, 0, 0, _framebuffer.w, _framebuffer.h);
-
+
// Free memory
_framebuffer.free();
@@ -279,36 +279,36 @@ void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, i
{
u16* bg = (u16 *) DS::get16BitBackBuffer();
u16* src = (u16 *) buf;
-
+
// if (x + w > 256) w = 256 - x;
//if (x + h > 256) h = 256 - y;
// consolePrintf("Copy rect ovl %d, %d %d, %d %d\n", x, y, w, h, pitch);
-
-
+
+
for (int dy = y; dy < y + h; dy++) {
-
-
+
+
// Slow but save copy:
for (int dx = x; dx < x + w; dx++) {
-
+
*(bg + (dy * 512) + dx) = *src;
//if ((*src) != 0) consolePrintf("%d,%d: %d ", dx, dy, *src);
//consolePrintf("%d,", *src);
src++;
}
src += (pitch - w);
-
+
// Fast but broken copy: (why?)
/*
REG_IME = 0;
dmaCopy(src, bg + (dy << 9) + x, w * 2);
REG_IME = 1;
-
+
src += pitch;*/
}
-
+
// consolePrintf("Copy rect ovl done");
}
@@ -325,7 +325,7 @@ int16 OSystem_DS::getOverlayWidth()
return getWidth();
}
-
+
bool OSystem_DS::showMouse(bool visible)
{
DS::setShowCursor(visible);
@@ -366,7 +366,7 @@ bool OSystem_DS::pollEvent(Common::Event &event)
return true;
}
}
-
+
return false;
/* if (lastPenFrame != DS::getMillis()) {
@@ -379,7 +379,7 @@ bool OSystem_DS::pollEvent(Common::Event &event)
if (eventNum == 1) {
eventNum = 0;
lastPenFrame = DS::getMillis();
- if (DS::getPenDown()) {
+ if (DS::getPenDown()) {
event.type = Common::EVENT_LBUTTONDOWN;
event.mouse = Common::Point(DS::getPenX(), DS::getPenY());
consolePrintf("Down %d, %d ", event.mouse.x, event.mouse.y);
@@ -408,12 +408,12 @@ void OSystem_DS::delayMillis(uint msecs)
int st = getMillis();
DS::addEventsToQueue();
DS::CD::update();
-
+
DS::doSoundCallback();
while (st + msecs >= getMillis()) {
DS::doSoundCallback();
}
-
+
DS::doTimerCallback();
DS::checkSleepMode();
DS::addEventsToQueue();
@@ -476,7 +476,7 @@ void OSystem_DS::quit()
/* consolePrintf("Soft resetting...");
IPC->reset = 1;
REG_IE = 0;
-
+
asm("swi 0x26\n");
swiSoftReset();*/
}
@@ -498,10 +498,10 @@ Common::SaveFileManager* OSystem_DS::getSavefileManager()
} else {
forceSram = false;
}
- if (forceSram) {
+ if (forceSram) {
consolePrintf("Using SRAM save method!\n");
}
-
+
if (DS::isGBAMPAvailable() && (!forceSram)) {
return &mpSaveManager;
} else {
@@ -519,7 +519,7 @@ Graphics::Surface* OSystem_DS::createTempFrameBuffer() {
_framebuffer.create(DS::getGameWidth(), DS::getGameHeight(), 1);
// Ensure we copy using 16 bit quantities due to limitation of VRAM addressing
-
+
size_t imageStrideInBytes = DS::isCpuScalerEnabled()? DS::getGameWidth() : 512;
size_t imageStrideInWords = imageStrideInBytes / 2;
diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h
index cae40be634..9d6454d02d 100644
--- a/backends/platform/ds/arm9/source/osystem_ds.h
+++ b/backends/platform/ds/arm9/source/osystem_ds.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
-
+
+
#ifndef _OSYSTEM_DS_H_
#define _OSYSTEM_DS_H_
#include "common/system.h"
@@ -33,10 +33,10 @@
#include "sound/mixer.h"
#include "graphics/surface.h"
-class DSAudioMixer : public Audio::Mixer {
+class DSAudioMixer : public Audio::Mixer {
};
-class DSTimerManager : public DefaultTimerManager {
+class DSTimerManager : public DefaultTimerManager {
};
@@ -45,10 +45,10 @@ protected:
int eventNum;
int lastPenFrame;
-
+
Common::Event eventQueue[96];
int queuePos;
-
+
DSSaveFileManager saveManager;
GBAMPSaveFileManager mpSaveManager;
DSAudioMixer* _mixer;
@@ -58,7 +58,7 @@ protected:
static OSystem_DS* _instance;
-
+
Graphics::Surface* createTempFrameBuffer();
public:
@@ -98,7 +98,7 @@ public:
inline virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b);
inline virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b);
-
+
virtual bool showMouse(bool visible);
virtual void warpMouse(int x, int y);
@@ -130,21 +130,21 @@ public:
virtual void displayMessageOnOSD(const char *msg);
virtual Common::SaveFileManager *getSavefileManager();
-
+
void addEvent(Common::Event& e);
bool isEventQueueEmpty() { return queuePos == 0; }
-
+
virtual bool grabRawScreen(Graphics::Surface* surf);
-
+
virtual void setFocusRectangle(const Common::Rect& rect);
-
+
virtual void clearFocusRectangle();
-
+
virtual void initBackend();
-
+
virtual Graphics::Surface *lockScreen();
virtual void unlockScreen();
-
+
virtual Audio::Mixer* getMixer() { return _mixer; }
virtual Common::TimerManager* getTimerManager() { return _timer; }
static int timerHandler(int t);
diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h
index b4bd15252a..12d53a332f 100644
--- a/backends/platform/ds/arm9/source/portdefs.h
+++ b/backends/platform/ds/arm9/source/portdefs.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _PORTDEFS_H_
#define _PORTDEFS_H_
diff --git a/backends/platform/ds/arm9/source/ramsave.cpp b/backends/platform/ds/arm9/source/ramsave.cpp
index 24eea80c5c..8bcc34f9af 100644
--- a/backends/platform/ds/arm9/source/ramsave.cpp
+++ b/backends/platform/ds/arm9/source/ramsave.cpp
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
+ *
*/
// Save in order 1,2,3,4,larger 2,5
#include "system.h"
@@ -52,18 +52,18 @@ DSSaveFile::DSSaveFile(SCUMMSave* s, bool compressed, u8* data) {
ownsData = true;
saveCompressed = false;
// consolePrintf("Decompressed. name=%s size=%d (%d)", save.name, save.size, save.compressedSize);
-
+
} else {
ownsData = false;
origHeader = s;
}
-
+
if (save.magic == (int) 0xBEEFCAFE) {
save.isValid = true;
} else {
save.isValid = false;
}
-
+
isTempFile = false;
}
@@ -78,7 +78,7 @@ DSSaveFile::~DSSaveFile() {
}
bool DSSaveFile::loadFromSaveRAM(vu8* address) {
-
+
SCUMMSave newSave;
for (int t = 0; t < (int) sizeof(newSave); t++) {
@@ -89,13 +89,13 @@ bool DSSaveFile::loadFromSaveRAM(vu8* address) {
newSave.isValid = true;
*((u16 *) (0x4000204)) |= 0x3;
-
+
saveData = new unsigned char[newSave.compressedSize];
-
+
for (int t = 0; t < (int) newSave.compressedSize; t++) {
((char *) (saveData))[t] = *(address + t + sizeof(newSave));
}
-
+
if (ownsData) delete this->saveData;
save = newSave;
saveCompressed = true;
@@ -105,7 +105,7 @@ bool DSSaveFile::loadFromSaveRAM(vu8* address) {
return true;
}
-
+
return false;
}
@@ -114,11 +114,11 @@ void DSSaveFile::compress() {
unsigned char* compBuffer = new unsigned char[(save.size * 110) / 100];
int compSize = LZ_Compress((u8 *) saveData, compBuffer, save.size);
save.compressedSize = compSize;
-
-
-
+
+
+
delete saveData;
-
+
// Make the save smaller
saveData = (u8 *) realloc(compBuffer, save.compressedSize);
saveCompressed = true;
@@ -129,39 +129,39 @@ int DSSaveFile::saveToSaveRAM(vu8* address) {
unsigned char* compBuffer;
bool failed;
-
+
int compSize;
-
+
compress();
-
+
compSize = save.compressedSize;
compBuffer = saveData;
-
+
if (DSSaveFileManager::instance()->getBytesFree() >= getRamUsage()) {
DSSaveFileManager::instance()->addBytesFree(-getRamUsage());
-
+
// Write header
for (int t = 0; t < sizeof(save); t++) {
while (*(address + t) != ((char *) (&save))[t]) {
*(address + t) = ((char *) (&save))[t];
}
}
-
+
// Write compressed buffer
for (int t = sizeof(save); t < (int) sizeof(save) + compSize; t++) {
while (*(address + t) != compBuffer[t - sizeof(save)]) {
*(address + t) = compBuffer[t - sizeof(save)];
}
}
-
+
failed = false;
} else {
failed = true;
}
-
+
return failed? 0: compSize + sizeof(save);
}
@@ -177,7 +177,7 @@ uint32 DSSaveFile::read(void *buf, uint32 size) {
}
memcpy(buf, saveData + ptr, size);
// consolePrintf("byte: %d ", ((u8 *) (buf))[0]);
-
+
ptr += size;
return size;
}
@@ -249,7 +249,7 @@ bool DSSaveFile::matches(char* filename) {
return false;
}
}
-
+
void DSSaveFile::setName(char *name) {
save.isValid = true;
save.magic = 0xBEEFCAFE;
@@ -258,7 +258,7 @@ void DSSaveFile::setName(char *name) {
save.compressedSize = 0;
saveData = new unsigned char[DS_MAX_SAVE_SIZE];
strcpy(save.name, name);
-
+
if ((strstr(name, ".s99")) || (strstr(name, ".c"))) {
isTempFile = true;
} else {
@@ -298,10 +298,10 @@ void DSSaveFile::deleteFile() {
DSSaveFileManager::DSSaveFileManager() {
instancePtr = this;
-
+
*((u16 *) (0x4000204)) |= 0x3;
swiWaitForVBlank();
-
+
loadAllFromSRAM();
}
@@ -311,7 +311,7 @@ DSSaveFileManager::~DSSaveFileManager() {
void DSSaveFileManager::loadAllFromSRAM() {
int addr = 1;
-
+
for (int r = 0; r < 8; r++) {
gbaSave[r].deleteFile();
}
@@ -332,7 +332,7 @@ void DSSaveFileManager::formatSram() {
for (int r = 0; r < SRAM_SAVE_MAX; r++) {
*(CART_RAM + r) = 0;
}
-
+
loadAllFromSRAM();
}
@@ -358,7 +358,7 @@ DSSaveFile *DSSaveFileManager::openSavefile(const char* filename, bool saveOrLoa
return gbaSave[r].clone();
}
}
-
+
if (saveOrLoad) {
return makeSaveFile(filename, saveOrLoad);
} else {
@@ -408,21 +408,21 @@ void DSSaveFileManager::listSavefiles(const char *prefix, bool *marks, int num)
}
}
}
-
+
}
*/
}
DSSaveFile *DSSaveFileManager::makeSaveFile(const char *filename, bool saveOrLoad) {
-
+
// Find a free save slot
int r = 0;
-
+
while ((r < 8) && (gbaSave[r].isValid())) {
r++;
}
-
+
if ((r == 8) && (gbaSave[r].isValid())) {
// No more saves
return NULL;
@@ -439,9 +439,9 @@ void DSSaveFileManager::flushToSaveRAM() {
int cartAddr = 1;
int s;
int extraData = DSSaveFileManager::getExtraData();
-
+
*((u16 *) (0x4000204)) |= 0x3;
-
+
swiWaitForVBlank();
int size = 0;
@@ -451,20 +451,20 @@ void DSSaveFileManager::flushToSaveRAM() {
if (!gbaSave[r].isTemp()) size += gbaSave[r].getRamUsage();
}
}
-
+
if (size <= SRAM_SAVE_MAX) {
for (int r = 0; r < SRAM_SAVE_MAX; r++) {
*(CART_RAM + r) = 0;
}
-
+
sramBytesFree = SRAM_SAVE_MAX;
-
+
for (int r = 0; (r < 8); r++) {
if (gbaSave[r].isValid() && (!gbaSave[r].isTemp())) {
-
+
cartAddr += s = gbaSave[r].saveToSaveRAM(CART_RAM + cartAddr);
-
+
/* if (s == 0) {
consolePrintf("WARNING: Save didn't fit in cart RAM and has been lost!! Delete files and save again.", gbaSave[r].getName());
failed = true;
@@ -475,7 +475,7 @@ void DSSaveFileManager::flushToSaveRAM() {
consolePrintf("WARNING: Save didn't fit in cart RAM and has been lost!! Delete files and save again.");
loadAllFromSRAM();
-
+
}
DSSaveFileManager::setExtraData(extraData);
diff --git a/backends/platform/ds/arm9/source/ramsave.h b/backends/platform/ds/arm9/source/ramsave.h
index d7ba6b5d68..abf225e598 100644
--- a/backends/platform/ds/arm9/source/ramsave.h
+++ b/backends/platform/ds/arm9/source/ramsave.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _RAMSAVE_H_
#define _RAMSAVE_H_
@@ -46,56 +46,56 @@ class DSSaveFile : public Common::InSaveFile, public Common::OutSaveFile {
u16 extraMagic; // 32
u32 reserved; // 36
} __attribute__ ((packed));
-
+
SCUMMSave save;
u8* saveData;
SCUMMSave* origHeader;
bool isOpenFlag;
bool isTempFile;
-
+
public:
DSSaveFile();
DSSaveFile(SCUMMSave* s, bool saveCompressed, u8* data);
~DSSaveFile();
-
+
void reset();
-
+
bool isOpen() const { return isOpenFlag; }
virtual bool eos() const;
virtual void skip(uint32 size);
-
+
virtual uint32 pos() const;
virtual uint32 size() const;
virtual void seek(int32 pos, int whence);
uint32 read(void *buf, uint32 size);
uint32 write(const void *buf, uint32 size);
-
+
void setName(char *name);
char* getName() { return save.name; }
-
+
bool isValid() { return save.isValid; }
bool isTemp() { return isTempFile; }
bool matches(char* prefix, int num);
bool matches(char* filename);
-
+
void clearData();
void compress();
-
+
int getRamUsage() { return sizeof(save) + save.compressedSize; }
char* getRamImage() { return (char *) &save; }
-
+
int getSize() { return save.size; }
-
+
DSSaveFile* clone();
-
+
bool loadFromSaveRAM(vu8* address);
int saveToSaveRAM(vu8* address);
-
-
+
+
void deleteFile();
-
+
void operator delete(void *p) {
// consolePrintf("Finished! size=%d\n", ((DSSaveFile *) (p))->save->size);
}
@@ -107,34 +107,34 @@ public:
class DSSaveFileManager : public Common::SaveFileManager {
-
+
DSSaveFile gbaSave[8];
static DSSaveFileManager* instancePtr;
int sramBytesFree;
-
+
public:
DSSaveFileManager();
~DSSaveFileManager();
-
+
static DSSaveFileManager* instance() { return instancePtr; }
DSSaveFile *openSavefile(const char *filename, bool saveOrLoad);
-
+
virtual Common::OutSaveFile* openForSaving(const char* filename) { return openSavefile(filename, true); }
virtual Common::InSaveFile* openForLoading(const char* filename) { return openSavefile(filename, false); }
virtual bool removeSavefile(const char *filename);
virtual Common::StringList listSavefiles(const char *pattern);
-
+
void flushToSaveRAM();
-
+
void addBytesFree(int size) { sramBytesFree += size; }
int getBytesFree() { return sramBytesFree; }
void deleteFile(char* name);
void listFiles();
void formatSram();
-
+
void loadAllFromSRAM();
static bool isExtraDataPresent();
diff --git a/backends/platform/ds/arm9/source/scummconsole.c b/backends/platform/ds/arm9/source/scummconsole.c
index 2145b47353..980dea7bc4 100644
--- a/backends/platform/ds/arm9/source/scummconsole.c
+++ b/backends/platform/ds/arm9/source/scummconsole.c
@@ -25,7 +25,7 @@
//
// Changelog:
// 0.1: First version
-// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
+// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
// Changed some register defines for consistency.
//
//////////////////////////////////////////////////////////////////////
@@ -52,7 +52,7 @@ u16* fontMap;
u8 row, col;
//font may not start on a character base boundry
-u16 fontOffset;
+u16 fontOffset;
//the first character in the set (0 if you have a full set)
u16 fontStart;
@@ -65,7 +65,7 @@ u16 fontPal;
///////////////////////////////////////////////////////////
//consoleInit
-// param:
+// param:
// font: 16 color font
// charBase: the location the font data will be loaded to
// numCharacters: count of characters in the font
@@ -79,7 +79,7 @@ void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16*
int i;
row = col = 0;
-
+
fontStart = charStart;
fontOffset = 0;
@@ -111,9 +111,9 @@ void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16*
temp |= 0xF00;
if(font[i] & 0xF000)
temp |= 0xF000;
-
+
charBase[i] = temp;
- }
+ }
}
}//end if bitdepth
else
@@ -140,7 +140,7 @@ void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16*
void consoleInitDefault(u16* map, u16* charBase, u8 bitDepth)
{
- consoleInit((u16 *) default_font_bin, charBase, 128, 0, map, CONSOLE_USE_COLOR255, bitDepth);
+ consoleInit((u16 *) default_font_bin, charBase, 128, 0, map, CONSOLE_USE_COLOR255, bitDepth);
}
void consolePrintSet(int x, int y)
@@ -164,9 +164,9 @@ void consolePrintChar(char c)
{
col = 0;
- row++;
+ row++;
}
-
+
if(row >= CONSOLE_HEIGHT)
{
row--;
@@ -178,7 +178,7 @@ void consolePrintChar(char c)
}
-
+
switch(c)
{
@@ -199,7 +199,7 @@ void consolePrintChar(char c)
}
-
+
}
@@ -207,16 +207,16 @@ void printX(int w, unsigned d)
{
int loop = 0;
int i = 0;
-
+
char buf[20] = {0};
while(d > 0)
{
buf[loop++] = d & 0xF;
- d = d>>4;
+ d = d>>4;
}
-
+
for (i = 7; i >= 0; i--)
{
if(buf[i] || i < loop)
@@ -235,15 +235,15 @@ void printx(int w, unsigned int d)
{
int loop = 0;
int i = 0;
-
+
char buf[20] = {0};
while(d > 0)
{
buf[loop++] = d & 0xF;
- d = d>>4;
+ d = d>>4;
}
-
+
for (i = 7; i >= 0; i--)
{
if(buf[i] || i < loop)
@@ -262,8 +262,8 @@ void printInt(int w, int d)
{
int loop = 0;
int i = 0;
-
- char buf[20] = {0};
+
+ char buf[20] = {0};
if(d < 0)
{
@@ -276,9 +276,9 @@ void printInt(int w, int d)
else while (d > 0)
{
buf[loop++] = d % 10;
- d /= 10;
+ d /= 10;
}
-
+
for (i = 7; i >= 0; i--)
{
if(buf[i] || i < loop)
@@ -310,16 +310,16 @@ void print0X(int w, unsigned d)
{
int loop = 0;
int i = 0;
-
+
char buf[] = {0,0,0,0,0,0,0,0}; //set to zero cause I may add formatted output someday
-
+
while(d > 0)
{
buf[loop++] = d & 0xF;
- d = d>>4;
+ d = d>>4;
}
-
+
for (i = 7; i >= 0; i--)
{
if(buf[i] || i < w || i < loop)
@@ -336,16 +336,16 @@ void print0x(int w, unsigned int d)
{
int loop = 0;
int i = 0;
-
+
char buf[] = {0,0,0,0,0,0,0,0}; //set to zero cause I may add formatted output someday
-
+
while(d > 0)
{
buf[loop++] = d & 0xF;
- d = d>>4;
+ d = d>>4;
}
-
+
for (i = 7; i >= 0; i--)
{
if(buf[i] || i < w || i < loop)
@@ -362,9 +362,9 @@ void print0Int(int w, int d)
{
int loop = 0;
int i = 0;
-
+
char buf[] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; //set to zero cause I may add formatted output someday
-
+
if(d < 0)
{
consolePrintChar('-');
@@ -374,9 +374,9 @@ void print0Int(int w, int d)
while(d > 0)
{
buf[loop++] = d % 10;
- d /= 10;
+ d /= 10;
}
-
+
for (i = 15; i >= 0; i--)
if(buf[i] || i < w || i < loop)
consolePrintChar(buf[i] + '0');
@@ -414,14 +414,14 @@ void printF(int w, float f)
if(*t & BIT(31))
consolePrintChar('-');
-
+
print0Bin(32, fraction);
-
+
printInt(1, fraction);
consolePrintChar('e');
printInt(1, exp - 127);
-
+
/*
if(exp == 0 && fraction == 0)
{
@@ -447,7 +447,7 @@ void consolePrintf(const char* s, ...)
va_list argp;
va_start(argp, s);
-
+
while(*s)
{
@@ -474,7 +474,7 @@ void consolePrintf(const char* s, ...)
case 'I':
case 'd':
case 'D':
- if(z)print0Int(w, va_arg(argp, int));
+ if(z)print0Int(w, va_arg(argp, int));
else printInt(w, va_arg(argp, int));
s++;
break;
diff --git a/backends/platform/ds/arm9/source/scummconsole.h b/backends/platform/ds/arm9/source/scummconsole.h
index 01fdfc2f04..d8ccf34c62 100644
--- a/backends/platform/ds/arm9/source/scummconsole.h
+++ b/backends/platform/ds/arm9/source/scummconsole.h
@@ -25,7 +25,7 @@
//
// Changelog:
// 0.1: First version
-// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
+// 0.2: Fixed sprite mapping bug. 1D mapping should work now.
// Changed some register defines for consistency.
//
//////////////////////////////////////////////////////////////////////
diff --git a/backends/platform/ds/arm9/source/scummhelp.cpp b/backends/platform/ds/arm9/source/scummhelp.cpp
index 452f782dc5..f9efd58276 100644
--- a/backends/platform/ds/arm9/source/scummhelp.cpp
+++ b/backends/platform/ds/arm9/source/scummhelp.cpp
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#include "scummhelp.h"
#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while (0)
diff --git a/backends/platform/ds/arm9/source/scummhelp.h b/backends/platform/ds/arm9/source/scummhelp.h
index e79c863cbd..602cb5f788 100644
--- a/backends/platform/ds/arm9/source/scummhelp.h
+++ b/backends/platform/ds/arm9/source/scummhelp.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _SCUMMHELP_H_
#define _SCUMMHELP_H_
@@ -30,7 +30,7 @@ namespace DS {
void updateStrings(byte gameId, byte version, Common::Platform platform,
int page, Common::String &title, Common::String *&key, Common::String *&dsc);
-
+
}
#endif
diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp
index 9ac8361985..5927f204da 100644
--- a/backends/platform/ds/arm9/source/touchkeyboard.cpp
+++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp
@@ -45,7 +45,7 @@ struct key_data {
key_data keys[DS_NUM_KEYS] = {
// Key number x y character
-
+
// Numbers
{28, 3, 0, '1'},
{29, 5, 0, '2'},
@@ -116,7 +116,7 @@ key_data keys[DS_NUM_KEYS] = {
{54, 29, 8, Common::KEYCODE_DOWN},
{53, 31, 8, Common::KEYCODE_RIGHT},
{51, 29, 6, Common::KEYCODE_UP},
-
+
// Close button
{56, 30, 0, Common::KEYCODE_INVALID},
@@ -133,7 +133,7 @@ key_data keys[DS_NUM_KEYS] = {
{66, 26, -2, Common::KEYCODE_F10},
{67, 28, -2, Common::KEYCODE_F11},
{68, 30, -2, Common::KEYCODE_F12},
-
+
};
int keyboardX;
@@ -162,7 +162,7 @@ void restoreVRAM(int tileBase, int mapBase, u16* saveSpace) {
/* for (int r = 0; r < 32 * 32; r++) {
((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r] = *saveSpace++;
}
-
+
for (int r = 0; r < 4096; r++) {
((u16 *) CHAR_BASE_BLOCK_SUB(tileBase))[r] = *saveSpace++;
}*/
@@ -175,19 +175,19 @@ void drawKeyboard(int tileBase, int mapBase, u16* saveSpace) {
// *saveSpace++ = ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r];
((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r] = 0;
}
-
+
for (int r = 0; r < KEYBOARD_DATA_SIZE / 2; r++) {
// *saveSpace++ = ((u16 *) CHAR_BASE_BLOCK_SUB(tileBase))[r];
((u16 *) CHAR_BASE_BLOCK_SUB(tileBase))[r] = ((u16 *) (keyboard_raw))[r];
}
-
+
for (int r = 0; r < 16; r++) {
BG_PALETTE_SUB[r] = ((u16 *) (keyboard_pal_raw))[r];
}
// this is the font
for (int tile = 0; tile < 94; tile++) {
-
+
u16* tileAddr = (u16 *) (CHAR_BASE_BLOCK_SUB(tileBase) + ((KEYBOARD_DATA_SIZE) + (tile * 32)));
u8* src = ((u8 *) (_8x8font_tga_raw)) + 18 + tile * 8;
@@ -197,55 +197,55 @@ void drawKeyboard(int tileBase, int mapBase, u16* saveSpace) {
| ((*(src + (y * 752) + (x * 4) + 1) & 0x0F) << 4)
| ((*(src + (y * 752) + (x * 4) + 2) & 0x0F) << 8)
| ((*(src + (y * 752) + (x * 4) + 3) & 0x0F) << 12);
-
+
}
}
}
-
+
for (int r = 0; r < 16; r++) {
int col = ((u16 *) (keyboard_pal_raw))[r];
-
+
int red = col & 0x001F;
int green = (col & 0x03E0) >> 5;
int blue = (col & 0x7C00) >> 10;
-
+
red = (red * 8) / 16;
green = (green * 24) / 16;
blue = (blue * 8) / 16;
if (green > 31) green = 31;
-
+
BG_PALETTE_SUB[16 + r] = red | (green << 5) | (blue << 10);
}
-
+
keyboardX = -2;
keyboardY = 2;
-
+
DS::mapBase = mapBase;
DS::tileBase = tileBase;
-
+
shiftState = false;
capsLockState = false;
-
+
int x = keyboardX;
int y = keyboardY;
-
+
u16* base = ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase));
baseAddress = base;
-
+
for (int r = 0; r < DS_NUM_KEYS; r++) {
base[(y + keys[r].y) * 32 + x + keys[r].x] = 10 + keys[r].keyNum * 2;
base[(y + keys[r].y) * 32 + x + keys[r].x + 1] = 10 + keys[r].keyNum * 2 + 1;
-
+
base[(y + keys[r].y + 1) * 32 + x + keys[r].x] = 10 + 148 + keys[r].keyNum * 2;
base[(y + keys[r].y + 1) * 32 + x + keys[r].x + 1] = 10 + 148 + keys[r].keyNum * 2 + 1;
-
+
keys[r].pressed = false;
}
-
+
closed = false;
clearAutoComplete();
}
@@ -257,7 +257,7 @@ void drawAutoComplete() {
baseAddress[y * 32 + x] = 0;
}
}
-
+
for (int r = 0; r < autoCompleteCount; r++) {
int y = 12 + (r % 6) * 2;
@@ -265,15 +265,15 @@ void drawAutoComplete() {
for (int p = 0; p < strlen(autoCompleteWord[r]); p++) {
char c = autoCompleteWord[r][p];
-
+
int tile = c - 33 + (KEYBOARD_DATA_SIZE / 32);
if (selectedCompletion == r) {
tile |= 0x1000;
}
- baseAddress[y * 32 + x + p] = tile;
-
+ baseAddress[y * 32 + x + p] = tile;
+
}
}
@@ -330,7 +330,7 @@ void typeCompletion(int current) {
event.type = Common::EVENT_KEYDOWN;
event.kbd.flags = 0;
system->addEvent(event);
-
+
event.type = Common::EVENT_KEYUP;
system->addEvent(event);
}
@@ -351,13 +351,13 @@ void updateTypeEvents()
{
Common::Event event;
OSystem_DS* system = OSystem_DS::instance();
-
+
event.kbd.keycode = (Common::KeyCode) autoCompleteBuffer[0];
event.kbd.ascii = autoCompleteBuffer[0];
event.type = Common::EVENT_KEYDOWN;
event.kbd.flags = 0;
system->addEvent(event);
-
+
event.type = Common::EVENT_KEYUP;
system->addEvent(event);
@@ -380,21 +380,21 @@ void createKeyEvent(int keyNum, Common::Event& event)
} else {
event.kbd.keycode = (Common::KeyCode) (Common::KEYCODE_F1 - (keys[keyNum].character - '1'));
event.kbd.ascii = 0;
- }
-
+ }
+
} else if ((keys[keyNum].character >= 'A') && (keys[keyNum].character <= 'Z')) {
-
+
if ((!DS::shiftState) && (!DS::capsLockState)) {
event.kbd.ascii = keys[keyNum].character + 32; // Make key lowercase.
} else {
event.kbd.ascii = keys[keyNum].character;
}
-
+
event.kbd.keycode = (Common::KeyCode) event.kbd.ascii;
} else {
event.kbd.ascii = keys[keyNum].character;
event.kbd.keycode = (Common::KeyCode) keys[keyNum].character;
- }
+ }
}
void addKeyboardEvents() {
@@ -403,7 +403,7 @@ void addKeyboardEvents() {
if (DS::getPenDown()) {
int x = IPC->touchXpx;
int y = IPC->touchYpx;
-
+
int tx = (x >> 3);
int ty = (y >> 3);
@@ -427,48 +427,48 @@ void addKeyboardEvents() {
tx -= keyboardX;
ty -= keyboardY;
-
+
// consolePrintf("x=%d y=%d\n", tx, ty);
-
+
for (int r = 0; r < DS_NUM_KEYS; r++) {
- if (( (tx >= keys[r].x) && (tx <= keys[r].x + 1)) &&
+ if (( (tx >= keys[r].x) && (tx <= keys[r].x + 1)) &&
(ty >= keys[r].y) && (ty <= keys[r].y + 1)) {
OSystem_DS* system = OSystem_DS::instance();
Common::Event event;
-
+
// consolePrintf("Key: %d\n", r);
if ((keys[r].character == Common::KEYCODE_INVALID)) {
// Close button
DS::closed = true;
} else {
createKeyEvent(r, event);
- }
-
- //event.kbd.keycode = keys[r].character;
- //event.kbd.ascii = keys[r].character;
+ }
+
+ //event.kbd.keycode = keys[r].character;
+ //event.kbd.ascii = keys[r].character;
event.type = Common::EVENT_KEYDOWN;
system->addEvent(event);
// event.type = Common::EVENT_KEYUP;
// system->addEvent(event);
-
+
switch (keys[r].character) {
case DS_SHIFT: {
DS::shiftState = !DS::shiftState;
DS::setKeyHighlight(r, DS::shiftState);
break;
}
-
+
case DS_CAPSLOCK: {
DS::capsLockState = !DS::capsLockState;
DS::setKeyHighlight(r, DS::capsLockState);
break;
}
-
+
default: {
DS::setKeyHighlight(r, true);
keys[r].pressed = true;
-
+
if (DS::shiftState) {
DS::shiftState = false;
for (int t = 0; t < DS_NUM_KEYS; t++) {
@@ -480,19 +480,19 @@ void addKeyboardEvents() {
break;
}
}
-
+
}
}
}
-
+
if (DS::getPenReleased()) {
-
+
for (int r = 0; r < DS_NUM_KEYS; r++) {
if (keys[r].pressed) {
DS::setKeyHighlight(r, false);
OSystem_DS* system = OSystem_DS::instance();
-
+
Common::Event event;
createKeyEvent(r, event);
event.type = Common::EVENT_KEYUP;
@@ -500,7 +500,7 @@ void addKeyboardEvents() {
keys[r].pressed = false;
}
- }
+ }
}
}
diff --git a/backends/platform/ds/arm9/source/touchkeyboard.h b/backends/platform/ds/arm9/source/touchkeyboard.h
index 8a5fc728ce..e4aa102ab4 100644
--- a/backends/platform/ds/arm9/source/touchkeyboard.h
+++ b/backends/platform/ds/arm9/source/touchkeyboard.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _TOUCHKEYBOARD_H_
#define _TOUCHKEYBOARD_H_
diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp
index b8fbf6c5cd..b5bebddb54 100644
--- a/backends/platform/ds/arm9/source/wordcompletion.cpp
+++ b/backends/platform/ds/arm9/source/wordcompletion.cpp
@@ -23,7 +23,7 @@ void addAutoCompleteLine(char* line) {
{
char word[32];
int length;
-
+
// Skip the T9-style numbers
while (*line != ' ')
{
@@ -37,7 +37,7 @@ void addAutoCompleteLine(char* line) {
if (*line == ' ') line++;
- // Copy the new word
+ // Copy the new word
do {
word[length++] = *line++;
} while ((*line != '\0') && (*line != ' ') && (*line != '\n'));
@@ -47,7 +47,7 @@ void addAutoCompleteLine(char* line) {
// Store a pointer to the start of the word
wordBufferPtr[wordBufferPtrPos++] = &wordBuffer[wordBufferPos];
-
+
// copy the new word into the buffer
strcpy(&wordBuffer[wordBufferPos], word);
wordBufferPos += strlen(word) + 1;
@@ -104,11 +104,11 @@ bool findWordCompletions(char* input)
// Get the word from the dictonary line
word = wordBufferPtr[position];
-
+
// Now check to see if the word is before or after the stub we're after
int result = scumm_stricmp((const char *) partialWord, (const char *) word);
-
+
if (result == 0) {
// We've found the whole word. Aren't we good.
break;
@@ -128,10 +128,10 @@ bool findWordCompletions(char* input)
word = wordBufferPtr[position];
//consolePrintf("Final word: %s\n", word);
-
+
system->setCharactersEntered(strlen(partialWord));
-
+
bool match = true;
@@ -161,7 +161,7 @@ bool findWordCompletions(char* input)
break;
}
}
-
+
if (match) {
system->addAutoComplete(word);
}
diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp
index 01321f44f5..7af0718a44 100644
--- a/backends/platform/ds/arm9/source/zipreader.cpp
+++ b/backends/platform/ds/arm9/source/zipreader.cpp
@@ -17,7 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
+ *
*/
@@ -29,25 +29,25 @@
ZipFile::ZipFile() {
// Locate a zip file in cartridge memory space
-
+
// consolePrintf("ZIP file check...");
-
+
char* p = (char *) ZF_SEARCH_START;
bool found = false;
-
+
_zipFile = NULL;
-
+
while ((p != (char *) ZF_SEARCH_END) && (!found)) {
// Zip file header is: 0x504B0304
-
+
if ( (*p == 0x50) && (*(p + 1) == 0x4B) && (*(p + 2) == 0x03) && (*(p + 3) == 0x04) ) {
// Found header!
found = true;
_zipFile = p;
}
-
+
if (!found) p += ZF_SEARCH_STRIDE;
-
+
}
if (_zipFile) {
@@ -56,14 +56,14 @@ ZipFile::ZipFile() {
// consolePrintf("Not in use!\n");
return;
}
-
+
changeToRoot();
restartFile();
-
+
if (_currentFile->compSize != (u32) getFileSize()) {
consolePrintf("Error: ZIP file contains compression!\n");
}
-
+
_allFilesVisible = false;
}
@@ -83,19 +83,19 @@ bool ZipFile::restartFile() {
getFileName(name);
more = skipFile();
}
-
+
return more;
}
bool ZipFile::currentFileInFolder() {
char name[128];
-
+
if (_allFilesVisible) return true;
-
+
getFileName(name);
// consolePrintf("N:'%s'D:'%s'\n", name, _directory);
-
+
if (_directory[0] == 0) { // Root directory
name[strlen(name) - 1] = 0;
return !strchr(name, '\\'); // Not in root if contains a / character before the last character
@@ -104,52 +104,52 @@ bool ZipFile::currentFileInFolder() {
&& (no slashes after the directory || it's the last character)
&& (slash follows directory)
*/
- if ((strstr(name, _directory) == name) && (strlen(name) != strlen(_directory))
+ if ((strstr(name, _directory) == name) && (strlen(name) != strlen(_directory))
&& ((strchr(name + strlen(_directory) + 1, '\\') == NULL)
|| (strchr(name + strlen(_directory) + 1, '\\') == name + strlen(name) - 1))
&& (*(name + strlen(_directory)) == '\\')) {
return true;
}
}
-
+
return false;
}
void ZipFile::getFileName(char* name) {
strncpy(name, (char *) (_currentFile + 1), _currentFile->nameLength);
-
+
for (int r = 0; r < (int) strlen(name); r++) {
if (name[r] == '/') name[r] = '\\';
}
name[_currentFile->nameLength] = 0;
-
+
if (name[strlen(name) - 1] == '\\') {
name[strlen(name) - 1] = 0;
- }
+ }
}
bool ZipFile::skipFile() {
bool valid;
do {
-
+
// Move on to the next file
_currentFile = (FileHeader *) (
((char *) (_currentFile)) + sizeof(*_currentFile) + _currentFile->nameLength + _currentFile->fileSize + _currentFile->extraLength
);
-
+
// Return true if there are more files. Check this by looking for the magic number
valid = (_currentFile->magic[0] == 0x50) &&
(_currentFile->magic[1] == 0x4B) &&
(_currentFile->magic[2] == 0x03) &&
(_currentFile->magic[3] == 0x04);
-
-
+
+
} while (valid && !currentFileInFolder());
-
+
return valid;
-
+
// Currently doesn't handle data descriptors!
}
@@ -180,7 +180,7 @@ char* ZipFile::getFile() {
bool ZipFile::findFile(char* search) {
changeToRoot();
restartFile();
-
+
char searchName[128];
strcpy(searchName, search);
for (int r = 0; r < (int) strlen(searchName); r++) {
@@ -191,15 +191,15 @@ bool ZipFile::findFile(char* search) {
*(searchName + strlen(searchName) - 1) = '\0'; // which we need to dispose of.
}
-
+
do {
char name[128];
getFileName(name);
if (*(name + strlen(name) - 1) == '\\') { // Directories have a terminating slash
*(name + strlen(name) - 1) = '\0'; // which we need to dispose of.
}
-
-
+
+
if (!stricmp(name, searchName)) {
// consolePrintf("'%s'=='%s'\n", name, searchName);
return true; // Got it!
@@ -222,7 +222,7 @@ void ZipFile::changeDirectory(char* dir) {
for (int r = 0; r < (int) strlen(_directory); r++) {
if (_directory[r] == '/') _directory[r] = '\\';
}
-
+
if (_directory[strlen(_directory) - 1] == '\\') {
_directory[strlen(_directory) - 1] = '\0';
}
diff --git a/backends/platform/ds/arm9/source/zipreader.h b/backends/platform/ds/arm9/source/zipreader.h
index 19aa3d9f31..cd7244dba5 100644
--- a/backends/platform/ds/arm9/source/zipreader.h
+++ b/backends/platform/ds/arm9/source/zipreader.h
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
+
#ifndef _ZIPREADER_H_
#define _ZIPREADER_H_
#include "portdefs.h"
@@ -45,9 +45,9 @@ class ZipFile {
char* _zipFile;
char _directory[128];
-
+
bool _allFilesVisible;
-
+
FileHeader* _currentFile;
public:
@@ -55,25 +55,25 @@ public:
~ZipFile();
bool isReady();
-
+
// These operations set the current file
bool restartFile();
bool skipFile();
- bool findFile(char* search);
+ bool findFile(char* search);
// These return the file's data and information
char* getFile();
int getFileSize();
void getFileName(char* name);
bool isDirectory();
-
+
// These set the current directory
void changeDirectory(char* name);
void changeToRoot();
void setAllFilesVisible(bool state) { _allFilesVisible = state; }
-
+
bool currentFileInFolder();
-
+
u16 misaligned16(u16* v);
u32 misaligned32(u32* v);
diff --git a/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h b/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
index d14e62af83..6a20f775c6 100644
--- a/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
+++ b/backends/platform/ds/commoninclude/NDS/scummvm_ipc.h
@@ -32,7 +32,7 @@
//////////////////////////////////////////////////////////////////////
-
+
typedef struct _adpcmBuffer {
u8* buffer[8];
bool filled[8];
@@ -40,66 +40,66 @@ typedef struct _adpcmBuffer {
bool arm7Dirty[8];
bool semaphore;
} adpcmBuffer;
-
+
//////////////////////////////////////////////////////////////////////
typedef struct scummvmTransferRegion {
uint32 heartbeat; // counts frames
-
+
int16 touchX, touchY; // TSC X, Y
int16 touchXpx, touchYpx; // TSC X, Y pixel values
int16 touchZ1, touchZ2; // TSC x-panel measurements
uint16 tdiode1, tdiode2; // TSC temperature diodes
uint32 temperature; // TSC computed temperature
-
+
uint16 buttons; // X, Y, /PENIRQ buttons
-
+
union {
uint8 curtime[8]; // current time response from RTC
-
+
struct {
u8 rtc_command;
u8 rtc_year; //add 2000 to get 4 digit year
u8 rtc_month; //1 to 12
u8 rtc_day; //1 to (days in month)
-
+
u8 rtc_incr;
u8 rtc_hours; //0 to 11 for AM, 52 to 63 for PM
u8 rtc_minutes; //0 to 59
u8 rtc_seconds; //0 to 59
};
};
-
+
uint16 battery; // battery life ?? hopefully. :)
uint16 aux; // i have no idea...
-
+
pTransferSound soundData;
-
+
adpcmBuffer adpcm;
-
-
+
+
// Don't rely on these below, will change or be removed in the future
vuint32 mailAddr;
vuint32 mailData;
vuint8 mailRead;
vuint8 mailBusy;
vuint32 mailSize;
-
+
bool performArm9SleepMode;
-
+
u32 test;
int tweak;
bool tweakChanged;
-
+
// bool fillSoundFirstHalf;
// bool fillSoundSecondHalf;
// These are used for ScummVMs sound output
bool fillNeeded[4];
int playingSection;
-
+
bool reset;
-
+
// Streaming sound
bool streamFillNeeded[4];
int streamPlayingSection;
diff --git a/backends/platform/gp2x/build/bundle.sh b/backends/platform/gp2x/build/bundle.sh
index 526742e2e7..8ac1c0ccc5 100644
--- a/backends/platform/gp2x/build/bundle.sh
+++ b/backends/platform/gp2x/build/bundle.sh
@@ -7,7 +7,7 @@ PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
export CXX=arm-open2x-linux-g++
export CXXFLAGS=-march=armv4t
export CPPFLAGS=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
-export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
+export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
echo Collecting files.
mkdir "scummvm-gp2x-`date '+%Y-%m-%d'`"
@@ -42,7 +42,7 @@ if [ -f /usr/bin/zip ]
echo You should have a "scummvm-gp2x-`date '+%Y-%m-%d'`.zip" for the GP2X port ready to go.
cd ..
rm -R ./"scummvm-gp2x-`date '+%Y-%m-%d'`"
- else
+ else
echo - /usr/bin/zip not found, ZIP bundle not created.
echo All included files can also be found in ./"scummvm-gp2x-`date '+%Y-%m-%d'`"
echo - Please use you preferred archive tool to bundle these files.
diff --git a/backends/platform/gp2x/build/config.sh b/backends/platform/gp2x/build/config.sh
index 8c01ded06b..4a30ed4a31 100644
--- a/backends/platform/gp2x/build/config.sh
+++ b/backends/platform/gp2x/build/config.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-echo Quick script to make running configure all the time less painful
+echo Quick script to make running configure all the time less painful
echo and let all the build work be done from the backend/build folder.
# Set the paths up here to generate the config.
@@ -12,12 +12,12 @@ PATH=/opt/open2x/gcc-4.1.1-glibc-2.3.6/bin:$PATH
export CXX=arm-open2x-linux-g++
export CXXFLAGS=-march=armv4t
export CPPFLAGS=-I/opt/open2x/gcc-4.1.1-glibc-2.3.6/include
-export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
-export DEFINES=-DNDEBUG
+export LDFLAGS=-L/opt/open2x/gcc-4.1.1-glibc-2.3.6/lib
+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-plugins
+./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-plugins
echo Generating config for GP2X complete. Check for errors.
diff --git a/backends/platform/gp2x/module.mk b/backends/platform/gp2x/module.mk
index e04816bce3..0d771e2579 100644
--- a/backends/platform/gp2x/module.mk
+++ b/backends/platform/gp2x/module.mk
@@ -7,7 +7,7 @@ MODULE_OBJS := \
graphics.o \
gp2x.o
# gp2x-options.o
- # overload_help.o
+ # overload_help.o
MODULE_DIRS += \
backends/platform/gp2x/
diff --git a/backends/platform/gp32/gp32_main.cpp b/backends/platform/gp32/gp32_main.cpp
index e985993e5f..3db3dfe553 100644
--- a/backends/platform/gp32/gp32_main.cpp
+++ b/backends/platform/gp32/gp32_main.cpp
@@ -88,6 +88,6 @@ void GpMain(void *arg) {
memBlockDeinit();
g_system->quit(); // TODO: Consider removing / replacing this!
-
+
//return res;
}
diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp
index 56a9f103ed..866d97e966 100644
--- a/backends/platform/gp32/gp32_osys.cpp
+++ b/backends/platform/gp32/gp32_osys.cpp
@@ -194,7 +194,7 @@ void OSystem_GP32::copyRectToScreen(const byte *src, int pitch, int x, int y, in
if (w <= 0 || h <= 0)
return;
-
+
byte *dst = _gameScreen + y * _screenWidth + x;
if (_screenWidth == pitch && pitch == w) {
@@ -346,7 +346,7 @@ void OSystem_GP32::copyRectToOverlay(const OverlayColor *buf, int pitch, int x,
if (w <= 0 || h <= 0)
return;
-
+
OverlayColor *dst = _overlayBuffer + y * _overlayWidth + x;
if (_overlayWidth == pitch && pitch == w) {
memcpy(dst, buf, h * w * sizeof(OverlayColor));
@@ -504,7 +504,7 @@ bool OSystem_GP32::pollEvent(Common::Event &event) {
if (!gp_pollButtonEvent(&ev))
return false;
-
+
switch(ev.type) {
case BUTTON_DOWN:
if (ev.button == GPC_VK_LEFT) {
@@ -715,9 +715,9 @@ bool OSystem_GP32::setSoundCallback(SoundProc proc, void *param) {
if (ConfMan.hasKey("output_rate"))
_samplesPerSec = ConfMan.getInt("output_rate");
-
+
_samplesPerSec = (int)g_vars.sampleRate; //hack
-
+
if (_samplesPerSec == 0) {
return false;
}
diff --git a/backends/platform/gp32/gp32_osys.h b/backends/platform/gp32/gp32_osys.h
index 44a313265f..9938671962 100644
--- a/backends/platform/gp32/gp32_osys.h
+++ b/backends/platform/gp32/gp32_osys.h
@@ -54,7 +54,7 @@ protected:
uint32 _shakePos;
// Keyboard mouse emulation
- struct KbdMouse {
+ struct KbdMouse {
int16 x, y, x_vel, y_vel, x_max, y_max, x_down_count, y_down_count;
uint32 last_time, delay_time, x_down_time, y_down_time;
};
@@ -73,7 +73,7 @@ protected:
byte *_mouseBuf;
bool _adjustAspectRatio;
-
+
/** Force full redraw on next updateScreen */
bool _forceFull;
diff --git a/backends/platform/gp32/gp32std.cpp b/backends/platform/gp32/gp32std.cpp
index 13ec3a1a2a..13c055ebfa 100644
--- a/backends/platform/gp32/gp32std.cpp
+++ b/backends/platform/gp32/gp32std.cpp
@@ -51,7 +51,7 @@ void _dprintf(const char *s, ...) {
if (debnext == DEBUG_MAX)
debnext = 0;
gp_fillRect(frameBuffer1, 0, 243 - (DEBUG_MAX * 8) - 4, 320, (DEBUG_MAX * 8), 0);
-
+
for (deb = debnext, deba = 0; deb < DEBUG_MAX; deb++, deba++) {
//gp_fillRect(frameBuffer1, 0, (243 - (DEBUG_MAX * 8) - 4) + 8 * deba, 320, 8, 0);
gp_textOut(frameBuffer1, 0, (240 - (DEBUG_MAX * 8) - 4) + 8 * deba, debline[deb], 0xFFFF);
diff --git a/backends/platform/gp32/gp32std_input.cpp b/backends/platform/gp32/gp32std_input.cpp
index a3ad7a00c8..41689d9472 100644
--- a/backends/platform/gp32/gp32std_input.cpp
+++ b/backends/platform/gp32/gp32std_input.cpp
@@ -148,7 +148,7 @@ public:
return (numElement == MAX_EVENTS);
}
- bool get(GP32BtnEvent *ev) {
+ bool get(GP32BtnEvent *ev) {
if (front == rear) {
return false;
}
diff --git a/backends/platform/gp32/gp32std_sound.cpp b/backends/platform/gp32/gp32std_sound.cpp
index 71c09c900c..68b33b95f2 100644
--- a/backends/platform/gp32/gp32std_sound.cpp
+++ b/backends/platform/gp32/gp32std_sound.cpp
@@ -151,7 +151,7 @@ int gp_soundBufStart(GPSOUNDBUF *sb) {
}
soundBuf.samplesize = 1 << shiftVal;
-
+
// Allocate memory for the playing buffer
bufferSize = soundBuf.samplesize * soundBuf.samples * 2;
buffer = malloc(bufferSize);
diff --git a/backends/platform/gp32/gp_asmlib.s b/backends/platform/gp32/gp_asmlib.s
index 3d0bfd9a2e..e1f1d8cb39 100644
--- a/backends/platform/gp32/gp_asmlib.s
+++ b/backends/platform/gp32/gp_asmlib.s
@@ -322,7 +322,7 @@ _fincol6:
gp_clearFramebuffer:
@ r0 = framebuffer
@ r1 = color
- orr r1,r1,r1,lsl #16 @hi halfword = lo halfword
+ orr r1,r1,r1,lsl #16 @hi halfword = lo halfword
mov r2,#38400
clear: str r1,[r0],#4
subs r2,r2,#1
diff --git a/backends/platform/gp32/memcpy.S b/backends/platform/gp32/memcpy.S
index 1572831179..12853dbfc4 100644
--- a/backends/platform/gp32/memcpy.S
+++ b/backends/platform/gp32/memcpy.S
@@ -119,7 +119,7 @@ Lmemcpy_ft8:
/* We have aligned source and destination */
subs r2, r2, #8
blt Lmemcpy_fl12 /* less than 12 bytes (4 from above) */
-subs r2, r2, #0x14
+subs r2, r2, #0x14
blt Lmemcpy_fl32 /* less than 32 bytes (12 from above) */
stmdb sp!, {r4} /* borrow r4 */
@@ -130,23 +130,23 @@ ldmia r1!, {r3, r4, r12, lr}
stmia r0!, {r3, r4, r12, lr}
ldmia r1!, {r3, r4, r12, lr}
stmia r0!, {r3, r4, r12, lr}
-subs r2, r2, #0x20
+subs r2, r2, #0x20
bge Lmemcpy_floop32
cmn r2, #0x10
ldmgeia r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */
stmgeia r0!, {r3, r4, r12, lr}
-subge r2, r2, #0x10
+subge r2, r2, #0x10
ldmia sp!, {r4} /* return r4 */
Lmemcpy_fl32:
-adds r2, r2, #0x14
+adds r2, r2, #0x14
/* blat 12 bytes at a time */
Lmemcpy_floop12:
ldmgeia r1!, {r3, r12, lr}
stmgeia r0!, {r3, r12, lr}
-subges r2, r2, #0x0c
+subges r2, r2, #0x0c
bge Lmemcpy_floop12
Lmemcpy_fl12:
@@ -201,9 +201,9 @@ ldr lr, [r1], #4
cmp r12, #2
bgt Lmemcpy_fsrcul3
beq Lmemcpy_fsrcul2
-cmp r2, #0x0c
+cmp r2, #0x0c
blt Lmemcpy_fsrcul1loop4
-sub r2, r2, #0x0c
+sub r2, r2, #0x0c
stmdb sp!, {r4, r5}
Lmemcpy_fsrcul1loop16:
@@ -217,10 +217,10 @@ orr r5, r5, r12, lsl #24
mov r12, r12, lsr #8
orr r12, r12, lr, lsl #24
stmia r0!, {r3-r5, r12}
-subs r2, r2, #0x10
+subs r2, r2, #0x10
bge Lmemcpy_fsrcul1loop16
ldmia sp!, {r4, r5}
-adds r2, r2, #0x0c
+adds r2, r2, #0x0c
blt Lmemcpy_fsrcul1l4
Lmemcpy_fsrcul1loop4:
@@ -236,9 +236,9 @@ sub r1, r1, #3
b Lmemcpy_fl4
Lmemcpy_fsrcul2:
-cmp r2, #0x0c
+cmp r2, #0x0c
blt Lmemcpy_fsrcul2loop4
-sub r2, r2, #0x0c
+sub r2, r2, #0x0c
stmdb sp!, {r4, r5}
Lmemcpy_fsrcul2loop16:
@@ -252,10 +252,10 @@ orr r5, r5, r12, lsl #16
mov r12, r12, lsr #16
orr r12, r12, lr, lsl #16
stmia r0!, {r3-r5, r12}
-subs r2, r2, #0x10
+subs r2, r2, #0x10
bge Lmemcpy_fsrcul2loop16
ldmia sp!, {r4, r5}
-adds r2, r2, #0x0c
+adds r2, r2, #0x0c
blt Lmemcpy_fsrcul2l4
Lmemcpy_fsrcul2loop4:
@@ -271,9 +271,9 @@ sub r1, r1, #2
b Lmemcpy_fl4
Lmemcpy_fsrcul3:
-cmp r2, #0x0c
+cmp r2, #0x0c
blt Lmemcpy_fsrcul3loop4
-sub r2, r2, #0x0c
+sub r2, r2, #0x0c
stmdb sp!, {r4, r5}
Lmemcpy_fsrcul3loop16:
@@ -287,10 +287,10 @@ orr r5, r5, r12, lsl #8
mov r12, r12, lsr #24
orr r12, r12, lr, lsl #8
stmia r0!, {r3-r5, r12}
-subs r2, r2, #0x10
+subs r2, r2, #0x10
bge Lmemcpy_fsrcul3loop16
ldmia sp!, {r4, r5}
-adds r2, r2, #0x0c
+adds r2, r2, #0x0c
blt Lmemcpy_fsrcul3l4
Lmemcpy_fsrcul3loop4:
@@ -330,18 +330,18 @@ ldmdb r1!, {r3, r4, r12, lr}
stmdb r0!, {r3, r4, r12, lr}
ldmdb r1!, {r3, r4, r12, lr}
stmdb r0!, {r3, r4, r12, lr}
-subs r2, r2, #0x20
+subs r2, r2, #0x20
bge Lmemcpy_bloop32
Lmemcpy_bl32:
-cmn r2, #0x10
+cmn r2, #0x10
ldmgedb r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */
stmgedb r0!, {r3, r4, r12, lr}
-subge r2, r2, #0x10
-adds r2, r2, #0x14
+subge r2, r2, #0x10
+adds r2, r2, #0x14
ldmgedb r1!, {r3, r12, lr} /* blat a remaining 12 bytes */
stmgedb r0!, {r3, r12, lr}
-subge r2, r2, #0x0c
+subge r2, r2, #0x0c
ldmia sp!, {r4, lr}
Lmemcpy_bl12:
@@ -393,9 +393,9 @@ ldr r3, [r1, #0]
cmp r12, #2
blt Lmemcpy_bsrcul1
beq Lmemcpy_bsrcul2
-cmp r2, #0x0c
+cmp r2, #0x0c
blt Lmemcpy_bsrcul3loop4
-sub r2, r2, #0x0c
+sub r2, r2, #0x0c
stmdb sp!, {r4, r5, lr}
Lmemcpy_bsrcul3loop16:
@@ -409,10 +409,10 @@ orr r5, r5, r4, lsr #24
mov r4, r4, lsl #8
orr r4, r4, r3, lsr #24
stmdb r0!, {r4, r5, r12, lr}
-subs r2, r2, #0x10
+subs r2, r2, #0x10
bge Lmemcpy_bsrcul3loop16
ldmia sp!, {r4, r5, lr}
-adds r2, r2, #0x0c
+adds r2, r2, #0x0c
blt Lmemcpy_bsrcul3l4
Lmemcpy_bsrcul3loop4:
@@ -428,9 +428,9 @@ add r1, r1, #3
b Lmemcpy_bl4
Lmemcpy_bsrcul2:
-cmp r2, #0x0c
+cmp r2, #0x0c
blt Lmemcpy_bsrcul2loop4
-sub r2, r2, #0x0c
+sub r2, r2, #0x0c
stmdb sp!, {r4, r5, lr}
Lmemcpy_bsrcul2loop16:
@@ -444,10 +444,10 @@ orr r5, r5, r4, lsr #16
mov r4, r4, lsl #16
orr r4, r4, r3, lsr #16
stmdb r0!, {r4, r5, r12, lr}
-subs r2, r2, #0x10
+subs r2, r2, #0x10
bge Lmemcpy_bsrcul2loop16
ldmia sp!, {r4, r5, lr}
-adds r2, r2, #0x0c
+adds r2, r2, #0x0c
blt Lmemcpy_bsrcul2l4
Lmemcpy_bsrcul2loop4:
@@ -463,9 +463,9 @@ add r1, r1, #2
b Lmemcpy_bl4
Lmemcpy_bsrcul1:
-cmp r2, #0x0c
+cmp r2, #0x0c
blt Lmemcpy_bsrcul1loop4
-sub r2, r2, #0x0c
+sub r2, r2, #0x0c
stmdb sp!, {r4, r5, lr}
Lmemcpy_bsrcul1loop32:
@@ -479,10 +479,10 @@ orr r5, r5, r4, lsr #8
mov r4, r4, lsl #24
orr r4, r4, r3, lsr #8
stmdb r0!, {r4, r5, r12, lr}
-subs r2, r2, #0x10
+subs r2, r2, #0x10
bge Lmemcpy_bsrcul1loop32
ldmia sp!, {r4, r5, lr}
-adds r2, r2, #0x0c
+adds r2, r2, #0x0c
blt Lmemcpy_bsrcul1l4
Lmemcpy_bsrcul1loop4:
diff --git a/backends/platform/gp32/portdefs.h b/backends/platform/gp32/portdefs.h
index e58c634e16..dd0d70a25a 100644
--- a/backends/platform/gp32/portdefs.h
+++ b/backends/platform/gp32/portdefs.h
@@ -57,9 +57,9 @@
#undef fseek
#undef ferror
-#undef clearerr
+#undef clearerr
-#undef feof
+#undef feof
#undef getc
#define FILE GPFILE
diff --git a/backends/platform/iphone/iphone_common.h b/backends/platform/iphone/iphone_common.h
index 6a5250a018..3c0d57aeb4 100644
--- a/backends/platform/iphone/iphone_common.h
+++ b/backends/platform/iphone/iphone_common.h
@@ -57,7 +57,7 @@ extern "C" {
// On the C++ side
void iphone_main(int argc, char *argv[]);
-
+
// On the ObjC side
void iPhone_updateScreen();
void iPhone_updateScreenRect(int x1, int y1, int x2, int y2);
diff --git a/backends/platform/iphone/iphone_main.m b/backends/platform/iphone/iphone_main.m
index b338bd719a..f7f5667bb5 100644
--- a/backends/platform/iphone/iphone_main.m
+++ b/backends/platform/iphone/iphone_main.m
@@ -47,9 +47,9 @@ int main(int argc, char** argv) {
gArgv = argv;
[[NSAutoreleasePool alloc] init];
-
+
return UIApplicationMain(argc, argv, [iPhoneMain class]);
-}
+}
@implementation iPhoneMain
@@ -62,7 +62,7 @@ int main(int argc, char** argv) {
- (void) mainLoop: (id)param {
[[NSAutoreleasePool alloc] init];
-
+
iphone_main(gArgc, gArgv);
[UIApp terminate];
}
@@ -78,13 +78,13 @@ int main(int argc, char** argv) {
_window = [[UIWindow alloc] initWithContentRect: [UIHardware fullScreenApplicationContentRect]];
[_window retain];
-
+
_view = [[iPhoneView alloc] initWithFrame: [UIHardware fullScreenApplicationContentRect]];
[_window setContentView: _view];
-
+
[_window orderFront: self];
- [_window makeKey: self];
-
+ [_window makeKey: self];
+
[NSThread detachNewThreadSelector:@selector(mainLoop:) toTarget:self withObject:nil];
}
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 0bc07c10ac..d3a0b00bbe 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -69,7 +69,7 @@ void iPhone_initSurface(int width, int height, bool landscape) {
_width = width;
_height = height;
_landscape = landscape;
-
+
[sharedInstance performSelectorOnMainThread:@selector(initSurface) withObject:nil waitUntilDone: YES];
}
@@ -78,14 +78,14 @@ bool iPhone_fetchEvent(int *outEvent, float *outX, float *outY) {
if (event == nil) {
return false;
}
-
+
id type = [event objectForKey:@"type"];
-
+
if (type == nil) {
printf("fetchEvent says: No type!\n");
- return false;
+ return false;
}
-
+
*outEvent = [type intValue];
*outX = [[event objectForKey:@"x"] floatValue];
*outY = [[event objectForKey:@"y"] floatValue];
@@ -97,10 +97,10 @@ bool getLocalMouseCoords(CGPoint *point) {
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;
-
+
return true;
}
@@ -122,9 +122,9 @@ bool getLocalMouseCoords(CGPoint *point) {
-(void) dealloc {
[super dealloc];
-
+
if (_keyboardView != nil) {
- [_keyboardView dealloc];
+ [_keyboardView dealloc];
}
}
@@ -136,7 +136,7 @@ bool getLocalMouseCoords(CGPoint *point) {
// if (lastTick == 0) {
// lastTick = time(0);
// }
- //
+ //
// frames++;
// if (time(0) > lastTick) {
// lastTick = time(0);
@@ -148,7 +148,7 @@ bool getLocalMouseCoords(CGPoint *point) {
- (void)updateScreenRect:(id)rect {
NSRect nsRect = [rect rectValue];
CGRect cgRect = CGRectMake(nsRect.origin.x, nsRect.origin.y, nsRect.size.width, nsRect.size.height);
- [sharedInstance setNeedsDisplayInRect: cgRect];
+ [sharedInstance setNeedsDisplayInRect: cgRect];
}
- (void)initSurface {
@@ -157,7 +157,7 @@ bool getLocalMouseCoords(CGPoint *point) {
int pitch = _width * 2;
int allocSize = 2 * _width * _height;
char *pixelFormat = "565L";
-
+
NSDictionary* dict = [[NSDictionary alloc] initWithObjectsAndKeys:
kCFBooleanTrue, kCoreSurfaceBufferGlobal,
@"PurpleGFXMem", kCoreSurfaceBufferMemoryRegion,
@@ -179,7 +179,7 @@ bool getLocalMouseCoords(CGPoint *point) {
CoreSurfaceBufferLock(_screenSurface, 3);
LKLayer* screenLayer = [[LKLayer layer] retain];
-
+
if (_keyboardView != nil) {
[_keyboardView removeFromSuperview];
[[_keyboardView inputView] removeFromSuperview];
@@ -202,8 +202,8 @@ bool getLocalMouseCoords(CGPoint *point) {
//printf("Rect: %i, %i, %i, %i\n", _widthOffset, _heightOffset, rectWidth, rectHeight);
_screenRect = CGRectMake(_widthOffset, _heightOffset, rectWidth, rectHeight);
- [screenLayer setFrame: _screenRect];
- } else {
+ [screenLayer setFrame: _screenRect];
+ } else {
float ratio = (float)_height / (float)_width;
_screenRect = CGRectMake(0, 0, _fullWidth, _fullWidth * ratio);
[screenLayer setFrame: _screenRect];
@@ -211,9 +211,9 @@ bool getLocalMouseCoords(CGPoint *point) {
CGRect keyFrame = CGRectMake(0.0f, _screenRect.size.height, _fullWidth, _fullHeight - _screenRect.size.height);
if (_keyboardView == nil) {
_keyboardView = [[SoftKeyboard alloc] initWithFrame:keyFrame];
- [_keyboardView setInputDelegate:self];
+ [_keyboardView setInputDelegate:self];
}
-
+
[self addSubview:[_keyboardView inputView]];
[self addSubview: _keyboardView];
[[_keyboardView inputView] becomeFirstResponder];
@@ -221,14 +221,14 @@ bool getLocalMouseCoords(CGPoint *point) {
[screenLayer setContents: _screenSurface];
[screenLayer setOpaque: YES];
-
+
if (_screenLayer != nil) {
[[sharedInstance _layer] replaceSublayer: _screenLayer with: screenLayer];
} else {
[[sharedInstance _layer] addSublayer: screenLayer];
}
_screenLayer = screenLayer;
-
+
CoreSurfaceBufferUnlock(_screenSurface);
[dict release];
}
@@ -253,21 +253,21 @@ bool getLocalMouseCoords(CGPoint *point) {
if (event == nil) {
return nil;
}
-
+
[_events removeObjectAtIndex: 0];
[self unlock];
-
+
return event;
}
- (void)addEvent:(NSDictionary*)event {
[self lock];
-
+
if(_events == nil)
_events = [[NSMutableArray alloc] init];
-
+
[_events addObject: event];
-
+
[self unlock];
}
@@ -284,7 +284,7 @@ bool getLocalMouseCoords(CGPoint *point) {
- (void)mouseDown:(GSEvent*)event {
struct CGPoint point = GSEventGetLocationInWindow(event);
-
+
if (!getLocalMouseCoords(&point))
return;
@@ -300,10 +300,10 @@ bool getLocalMouseCoords(CGPoint *point) {
- (void)mouseUp:(GSEvent*)event {
struct CGPoint point = GSEventGetLocationInWindow(event);
-
+
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseUp], @"type",
@@ -317,10 +317,10 @@ bool getLocalMouseCoords(CGPoint *point) {
- (void)mouseDragged:(GSEvent*)event {
//printf("mouseDragged()\n");
struct CGPoint point = GSEventGetLocationInWindow(event);
-
+
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseDragged], @"type",
@@ -334,10 +334,10 @@ bool getLocalMouseCoords(CGPoint *point) {
- (void)mouseEntered:(GSEvent*)event {
//printf("mouseEntered()\n");
// struct CGPoint point = GSEventGetLocationInWindow(event);
- //
+ //
// if (!getLocalMouseCoords(&point))
// return;
- //
+ //
// [self addEvent:
// [[NSDictionary alloc] initWithObjectsAndKeys:
// [NSNumber numberWithInt:kInputMouseSecondToggled], @"type",
@@ -362,10 +362,10 @@ bool getLocalMouseCoords(CGPoint *point) {
{
//printf("mouseMoved()\n");
struct CGPoint point = GSEventGetLocationInWindow(event);
-
+
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseSecondToggled], @"type",
@@ -393,7 +393,7 @@ bool getLocalMouseCoords(CGPoint *point) {
- (int)swipe:(UIViewSwipeDirection)num withEvent:(GSEvent*)event {
//printf("swipe: %i\n", num);
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputSwipe], @"type",
@@ -416,7 +416,7 @@ bool getLocalMouseCoords(CGPoint *point) {
[NSNumber numberWithFloat:0], @"y",
nil
]
- ];
+ ];
}
- (void)applicationResume {
@@ -427,7 +427,7 @@ bool getLocalMouseCoords(CGPoint *point) {
[NSNumber numberWithFloat:0], @"y",
nil
]
- ];
+ ];
}
@end
diff --git a/backends/platform/iphone/module.mk b/backends/platform/iphone/module.mk
index 311a0490c5..a3c9a012fe 100644
--- a/backends/platform/iphone/module.mk
+++ b/backends/platform/iphone/module.mk
@@ -9,6 +9,6 @@ MODULE_OBJS := \
MODULE_DIRS += \
backends/platform/iphone/
-
+
# We don't use the rules.mk here on purpose
OBJS := $(addprefix $(MODULE)/, $(MODULE_OBJS)) $(OBJS)
diff --git a/backends/platform/iphone/osys_iphone.cpp b/backends/platform/iphone/osys_iphone.cpp
index 4dc5948aaf..2ca629d0e2 100644
--- a/backends/platform/iphone/osys_iphone.cpp
+++ b/backends/platform/iphone/osys_iphone.cpp
@@ -63,7 +63,7 @@ OSystem_IPHONE::OSystem_IPHONE() :
_needEventRestPeriod(false), _mouseClickAndDragEnabled(false),
_gestureStartX(-1), _gestureStartY(-1), _fullScreenIsDirty(false),
_mouseDirty(false), _timeSuspended(0)
-{
+{
_queuedInputEvent.type = (Common::EventType)0;
_lastDrawnMouseRect = Common::Rect(0, 0, 0, 0);
}
@@ -95,7 +95,7 @@ void OSystem_IPHONE::initBackend() {
setTimerCallback(&OSystem_IPHONE::timerHandler, 10);
OSystem::initBackend();
-}
+}
bool OSystem_IPHONE::hasFeature(Feature f) {
return false;
@@ -136,7 +136,7 @@ void OSystem_IPHONE::initSize(uint width, uint height) {
_screenHeight = height;
free(_offscreen);
-
+
_offscreen = (byte *)malloc(width * height);
bzero(_offscreen, width * height);
@@ -145,12 +145,12 @@ void OSystem_IPHONE::initSize(uint width, uint height) {
int fullSize = _screenWidth * _screenHeight * sizeof(OverlayColor);
_overlayBuffer = (OverlayColor *)malloc(fullSize);
clearOverlay();
-
+
free(_fullscreen);
_fullscreen = (uint16 *)malloc(fullSize);
bzero(_fullscreen, fullSize);
-
+
if (_screenOrientation != kScreenOrientationPortrait)
iPhone_initSurface(height, width, true);
else
@@ -177,7 +177,7 @@ void OSystem_IPHONE::setPalette(const byte *colors, uint start, uint num) {
_palette[i] = RGBToColor(b[0], b[1], b[2]);
b += 4;
}
-
+
dirtyFullScreen();
}
@@ -210,12 +210,12 @@ void OSystem_IPHONE::copyRectToScreen(const byte *buf, int pitch, int x, int y,
if (w <= 0 || h <= 0)
return;
-
+
if (!_fullScreenIsDirty) {
_dirtyRects.push_back(Common::Rect(x, y, x + w, y + h));
}
-
-
+
+
byte *dst = _offscreen + y * _screenWidth + x;
if (_screenWidth == pitch && pitch == w)
memcpy(dst, buf, h * w);
@@ -233,7 +233,7 @@ void OSystem_IPHONE::addDirtyRect(int16 x, int16 y, int16 w, int16 h) {
return;
}
- clipRectToScreen(x, y, w, h);
+ clipRectToScreen(x, y, w, h);
_dirtyRects.push_back(Common::Rect(x, y, x + w, y + h));
}
@@ -257,7 +257,7 @@ void OSystem_IPHONE::clipRectToScreen(int16 &x, int16 &y, int16 &w, int16 &h) {
if (w < 0) {
w = 0;
}
-
+
if (h < 0) {
h = 0;
}
@@ -268,7 +268,7 @@ void OSystem_IPHONE::updateScreen() {
if (_dirtyRects.size() == 0 && !_mouseDirty)
return;
-
+
internUpdateScreen();
_fullScreenIsDirty = false;
@@ -320,7 +320,7 @@ void OSystem_IPHONE::internUpdateScreen() {
uint16 *dst = &_fullscreen[dirtyRect.left * _screenHeight + (_screenHeight - dirtyRect.bottom)];
blitLandscapeScreenRect16bpp(dst, src, w, h, -_screenWidth, -_screenHeight);
break;
- }
+ }
case kScreenOrientationFlippedLandscape: {
uint16 *src = (uint16 *)&_overlayBuffer[dirtyRect.top * _screenWidth + dirtyRect.left];
uint16 *dst = &_fullscreen[(_screenWidth - dirtyRect.left - 1) * _screenHeight + dirtyRect.top];
@@ -354,9 +354,9 @@ void OSystem_IPHONE::internUpdateScreen() {
blitLandscapeScreenRect8bpp(dst, src, w, h, _palette, _screenWidth, _screenHeight);
break;
}
- }
+ }
}
-
+
//draw mouse on top
if (_mouseVisible && (dirtyRect.intersects(mouseRect))) {
int srcX = 0;
@@ -364,12 +364,12 @@ void OSystem_IPHONE::internUpdateScreen() {
int left = _mouseX - _mouseHotspotX;
if (left < 0) {
srcX -= left;
- left = 0;
+ left = 0;
}
int top = _mouseY - _mouseHotspotY;
if (top < 0) {
srcY -= top;
- top = 0;
+ top = 0;
}
//int right = left + _mouseWidth;
@@ -380,7 +380,7 @@ void OSystem_IPHONE::internUpdateScreen() {
int displayWidth = _mouseWidth;
if (_mouseWidth + left > _screenWidth)
displayWidth = _screenWidth - left;
-
+
int displayHeight = _mouseHeight;
if (_mouseHeight + top > _screenHeight)
displayHeight = _screenHeight - top;
@@ -463,7 +463,7 @@ void OSystem_IPHONE::internUpdateScreen() {
fs += _screenHeight;
}
break;
- }
+ }
case kScreenOrientationFlippedLandscape: {
int height = h * 2;
int offset = ((_screenWidth - dirtyRect.left - 1) * _screenHeight + dirtyRect.top);
@@ -475,17 +475,17 @@ void OSystem_IPHONE::internUpdateScreen() {
fs -= _screenHeight;
}
break;
- }
+ }
}
}
-
+
//iPhone_updateScreenRect(dirtyRect.left, dirtyRect.top, dirtyRect.right, dirtyRect.bottom );
}
}
Graphics::Surface *OSystem_IPHONE::lockScreen() {
//printf("lockScreen()\n");
-
+
_framebuffer.pixels = _offscreen;
_framebuffer.w = _screenWidth;
_framebuffer.h = _screenHeight;
@@ -560,9 +560,9 @@ void OSystem_IPHONE::copyRectToOverlay(const OverlayColor *buf, int pitch, int x
return;
if (!_fullScreenIsDirty) {
- _dirtyRects.push_back(Common::Rect(x, y, x + w, y + h));
+ _dirtyRects.push_back(Common::Rect(x, y, x + w, y + h));
}
-
+
OverlayColor *dst = _overlayBuffer + (y * _screenWidth + x);
if (_screenWidth == pitch && pitch == w)
memcpy(dst, buf, h * w * sizeof(OverlayColor));
@@ -593,14 +593,14 @@ bool OSystem_IPHONE::showMouse(bool visible) {
void OSystem_IPHONE::warpMouse(int x, int y) {
//printf("warpMouse()\n");
-
+
_mouseX = x;
_mouseY = y;
_mouseDirty = true;
}
void OSystem_IPHONE::dirtyMouseCursor() {
- addDirtyRect(_mouseX - _mouseHotspotX, _mouseY - _mouseHotspotY, _mouseX + _mouseWidth - _mouseHotspotX, _mouseY + _mouseHeight - _mouseHotspotY);
+ addDirtyRect(_mouseX - _mouseHotspotX, _mouseY - _mouseHotspotY, _mouseX + _mouseWidth - _mouseHotspotX, _mouseY + _mouseHeight - _mouseHotspotY);
}
void OSystem_IPHONE::dirtyFullScreen() {
@@ -618,7 +618,7 @@ void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
free(_mouseBuf);
_mouseBuf = NULL;
}
-
+
if (_mouseBuf == NULL)
_mouseBuf = (byte *)malloc(w * h);
@@ -629,7 +629,7 @@ void OSystem_IPHONE::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
_mouseHotspotY = hotspotY;
_mouseKeyColour = keycolor;
-
+
memcpy(_mouseBuf, buf, w * h);
_mouseDirty = true;
@@ -639,12 +639,12 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
//printf("pollEvent()\n");
long curTime = getMillis();
-
+
if (_timerCallback && (curTime >= _timerCallbackNext)) {
_timerCallback(_timerCallbackTimer);
_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.
@@ -667,7 +667,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
switch (_screenOrientation) {
case kScreenOrientationPortrait:
x = (int)(xUnit * _screenWidth);
- y = (int)(yUnit * _screenHeight);
+ y = (int)(yUnit * _screenHeight);
break;
case kScreenOrientationLandscape:
x = (int)(yUnit * _screenWidth);
@@ -676,13 +676,13 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
case kScreenOrientationFlippedLandscape:
x = (int)((1.0 - yUnit) * _screenWidth);
y = (int)(xUnit * _screenHeight);
- break;
+ break;
}
switch ((InputEvent)eventType) {
case kInputMouseDown:
//printf("Mouse down at (%u, %u)\n", x, y);
-
+
// Workaround: kInputMouseSecondToggled isn't always sent when the
// secondary finger is lifted. Need to make sure we get out of that mode.
_secondaryTapped = false;
@@ -697,7 +697,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
event.mouse.x = _mouseX;
event.mouse.y = _mouseY;
return true;
- } else {
+ } else {
_lastMouseDown = curTime;
}
return false;
@@ -739,7 +739,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
if (lengthSq > 15000) { // Long enough gesture to react upon.
_gestureStartX = -1;
_gestureStartY = -1;
-
+
float vecLength = sqrt(lengthSq);
float vecXNorm = vecX / vecLength;
float vecYNorm = vecY / vecLength;
@@ -770,8 +770,8 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
// Swipe right
// _secondaryTapped = !_secondaryTapped;
// _gestureStartX = x;
- // _gestureStartY = y;
- //
+ // _gestureStartY = y;
+ //
// GUI::TimedMessageDialog dialog("Forcing toggle of pressed state.", 1500);
// dialog.runModal();
return false;
@@ -800,7 +800,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
event.type = Common::EVENT_LBUTTONUP;
event.mouse.x = _mouseX;
event.mouse.y = _mouseY;
-
+
_queuedInputEvent.type = Common::EVENT_RBUTTONDOWN;
_queuedInputEvent.mouse.x = _mouseX;
_queuedInputEvent.mouse.y = _mouseY;
@@ -812,11 +812,11 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
if (curTime - _lastSecondaryTap < 250 && !_overlayVisible) {
event.type = Common::EVENT_KEYDOWN;
_queuedInputEvent.type = Common::EVENT_KEYUP;
-
+
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;
+ event.kbd.ascii = _queuedInputEvent.kbd.ascii = Common::ASCII_ESCAPE;
+ _needEventRestPeriod = true;
_lastSecondaryTap = 0;
} else if (!_mouseClickAndDragEnabled) {
event.type = Common::EVENT_RBUTTONDOWN;
@@ -833,8 +833,8 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
event.type = Common::EVENT_RBUTTONUP;
event.mouse.x = _mouseX;
event.mouse.y = _mouseY;
- }
- }
+ }
+ }
break;
case kInputOrientationChanged:
//printf("Orientation: %i", (int)xUnit);
@@ -864,7 +864,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
dirtyFullScreen();
updateScreen();
- }
+ }
break;
case kInputApplicationSuspended:
@@ -930,9 +930,9 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
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;
+ _needEventRestPeriod = true;
break;
-
+
case kInputSwipe: {
Common::KeyCode keycode = Common::KEYCODE_INVALID;
switch (_screenOrientation) {
@@ -989,7 +989,7 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
default:
return false;
}
- break;
+ break;
}
event.kbd.keycode = _queuedInputEvent.kbd.keycode = keycode;
@@ -997,10 +997,10 @@ bool OSystem_IPHONE::pollEvent(Common::Event &event) {
event.type = Common::EVENT_KEYDOWN;
_queuedInputEvent.type = Common::EVENT_KEYUP;
event.kbd.flags = _queuedInputEvent.kbd.flags = 0;
- _needEventRestPeriod = true;
+ _needEventRestPeriod = true;
break;
}
-
+
default:
break;
}
@@ -1022,7 +1022,7 @@ void OSystem_IPHONE::suspendLoop() {
if (iPhone_fetchEvent(&eventType, &xUnit, &yUnit))
if ((InputEvent)eventType == kInputApplicationResumed)
done = true;
- usleep(100000);
+ usleep(100000);
}
AudioQueueStart(s_AudioQueue.queue, NULL);
@@ -1047,14 +1047,14 @@ OSystem::MutexRef OSystem_IPHONE::createMutex(void) {
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
-
+
pthread_mutex_t *mutex = (pthread_mutex_t *) malloc(sizeof(pthread_mutex_t));
if (pthread_mutex_init(mutex, &attr) != 0) {
printf("pthread_mutex_init() failed!\n");
free(mutex);
return NULL;
}
-
+
return (MutexRef)mutex;
}
@@ -1074,7 +1074,7 @@ void OSystem_IPHONE::deleteMutex(MutexRef mutex) {
if (pthread_mutex_destroy((pthread_mutex_t *) mutex) != 0) {
printf("pthread_mutex_destroy() failed!\n");
} else {
- free(mutex);
+ free(mutex);
}
}
@@ -1117,7 +1117,7 @@ bool OSystem_IPHONE::setSoundCallback(SoundProc proc, void *param) {
}
AQBufferCallback(&s_AudioQueue, s_AudioQueue.queue, s_AudioQueue.buffers[i]);
- }
+ }
AudioQueueSetParameter(s_AudioQueue.queue, kAudioQueueParam_Volume, 1.0);
if (AudioQueueStart(s_AudioQueue.queue, NULL)) {
@@ -1137,8 +1137,8 @@ int OSystem_IPHONE::getOutputSampleRate() const {
}
void OSystem_IPHONE::setTimerCallback(TimerProc callback, int interval) {
- //printf("setTimerCallback()\n");
-
+ //printf("setTimerCallback()\n");
+
if (callback != NULL) {
_timerCallbackTimer = interval;
_timerCallbackNext = getMillis() + interval;
@@ -1173,7 +1173,7 @@ OSystem *OSystem_IPHONE_create() {
}
void iphone_main(int argc, char *argv[]) {
-
+
// Redirect stdout and stderr if we're launching from the Springboard.
if (argc == 2 && strcmp(argv[1], "--launchedFromSB") == 0) {
FILE *newfp = fopen("/tmp/scummvm.log", "a");
@@ -1183,11 +1183,11 @@ void iphone_main(int argc, char *argv[]) {
*stdout = *newfp;
*stderr = *newfp;
setbuf(stdout, NULL);
- setbuf(stderr, NULL);
+ setbuf(stderr, NULL);
//extern int gDebugLevel;
//gDebugLevel = 10;
- }
+ }
}
g_system = OSystem_IPHONE_create();
diff --git a/backends/platform/iphone/osys_iphone.h b/backends/platform/iphone/osys_iphone.h
index 2d0bea310d..eeb8504680 100644
--- a/backends/platform/iphone/osys_iphone.h
+++ b/backends/platform/iphone/osys_iphone.h
@@ -34,7 +34,7 @@
typedef void (*SoundProc)(void *param, byte *buf, int len);
typedef int (*TimerProc)(int interval);
-
+
typedef struct AQCallbackStruct {
AudioQueueRef queue;
uint32 frameCount;
@@ -49,7 +49,7 @@ protected:
static AQCallbackStruct s_AudioQueue;
static SoundProc s_soundCallback;
static void *s_soundParam;
-
+
Common::SaveFileManager *_savefile;
Audio::Mixer *_mixer;
Common::TimerManager *_timer;
@@ -153,7 +153,7 @@ public:
virtual Common::SaveFileManager *getSavefileManager();
virtual Audio::Mixer *getMixer();
virtual Common::TimerManager *getTimerManager();
-
+
protected:
inline void addDirtyRect(int16 x1, int16 y1, int16 w, int16 h);
void internUpdateScreen();
diff --git a/backends/platform/maemo/hildon.cpp b/backends/platform/maemo/hildon.cpp
index d4f2aa122d..697e4d8b70 100644
--- a/backends/platform/maemo/hildon.cpp
+++ b/backends/platform/maemo/hildon.cpp
@@ -16,13 +16,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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
*
*/
-
+
#include <hildon-widgets/hildon-app.h>
#include <gtk/gtk.h>
#include <libosso.h>
@@ -108,9 +108,9 @@ int main(int argc, char *argv[]) {
gtk_box_pack_start(GTK_BOX(main_vbox), label, FALSE, TRUE, 0);
// Add handler for hello D-BUS messages
- result = osso_rpc_set_cb_f(appdata->osso_context,
- OSSO_APP_SERVICE,
- OSSO_APP_OBJECT,
+ result = osso_rpc_set_cb_f(appdata->osso_context,
+ OSSO_APP_SERVICE,
+ OSSO_APP_OBJECT,
OSSO_APP_IFACE,
dbus_req_handler, appdata);
if (result != OSSO_OK) {
diff --git a/backends/platform/maemo/main.cpp b/backends/platform/maemo/main.cpp
index af5c6b4c10..cbf271b970 100644
--- a/backends/platform/maemo/main.cpp
+++ b/backends/platform/maemo/main.cpp
@@ -16,15 +16,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.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
*
*/
-
+
#include <common/scummsys.h>
-#include <X11/Xlib.h>
+#include <X11/Xlib.h>
#include <X11/extensions/Xsp.h>
#include <SDL/SDL.h>
@@ -63,7 +63,7 @@ int main(int argc, char *argv[]) {
// return OSSO_ERROR;
//}
- // Maemo task navigator priority inheritance fix
+ // Maemo task navigator priority inheritance fix
setpriority(PRIO_PROCESS, 0, 0);
set_doubling(0);
@@ -79,6 +79,6 @@ int main(int argc, char *argv[]) {
//osso_deinitialize(osso_context);
set_doubling(0);
-
+
return res;
}
diff --git a/backends/platform/maemo/portdefs.h b/backends/platform/maemo/portdefs.h
index eec82858c5..52d16fd820 100644
--- a/backends/platform/maemo/portdefs.h
+++ b/backends/platform/maemo/portdefs.h
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
diff --git a/backends/platform/maemo/scummvm-0.11.0-maemo.patch b/backends/platform/maemo/scummvm-0.11.0-maemo.patch
index 35cb162a2b..9014a326cb 100644
--- a/backends/platform/maemo/scummvm-0.11.0-maemo.patch
+++ b/backends/platform/maemo/scummvm-0.11.0-maemo.patch
@@ -197,7 +197,7 @@ diff -Naur scummvm-0.11.orig/debian/rules scummvm-0.11/debian/rules
+ install -m0644 -d debian/scummvm/usr/share/scummvm
+ install -m0644 dists/pred.dic debian/scummvm/usr/share/scummvm
+# install -m0644 gui/themes/modern.ini gui/themes/modern.zip gui/themes/classic080.ini debian/scummvm/usr/share/scummvm
-+
++
+binary: binary-arch
+
+binary-arch: build install
@@ -275,7 +275,7 @@ diff -Naur scummvm-0.11.orig/debian/scummvm.substvars scummvm-0.11/debian/scummv
_keyboardEvent.pending = true;
_keyboardEvent.kbd = event.kbd;
}
-+
++
+ break;
+#ifdef MAEMO_SDL
+ case Common::EVENT_KEYUP:
@@ -297,7 +297,7 @@ diff -Naur scummvm-0.11.orig/debian/scummvm.substvars scummvm-0.11/debian/scummv
+#ifdef MAEMO_SDL
+ switch (_keyPressed.keycode) {
-+ case Common::KEYCODE_F8: _fastMode ^= 1; break ;// Map F8 (zoom out) to toggle fast mode
++ case Common::KEYCODE_F8: _fastMode ^= 1; break ;// Map F8 (zoom out) to toggle fast mode
+ case Common::KEYCODE_F4: _keyPressed.keycode = Common::KEYCODE_F5; _keyPressed.ascii=Common::ASCII_F5 ; break; // map F4 to F5 (menu key)
+ case Common::KEYCODE_RETURN: _keyPressed.keycode = Common::KEYCODE_TAB; _keyPressed.ascii=Common::ASCII_TAB ; break; // map Select (return) to Tab (right mouse button)
+ case Common::KEYCODE_F7: if(_game.id == GID_MONKEY2){ _keyPressed.ascii = '1';_keyPressed.keycode=Common::KEYCODE_1;} break; // map F7 (zoom in) to 1 (to bypass Monkey2 copy protection)
@@ -552,7 +552,7 @@ diff -Naur scummvm-0.11.orig/debian/scummvm.substvars scummvm-0.11/debian/scummv
+ case Common::KEYCODE_F7:
+ if (inMenu)
+ lastKeyStroke = '2';
-+ else
++ else
+ if (allowPlayerInput) {
+ playerCommand = 3; // USE
+ makeCommandLine();
@@ -656,13 +656,13 @@ diff -Naur scummvm-0.11.orig/debian/scummvm.substvars scummvm-0.11/debian/scummv
+#define ENG_OTHER -1
+//#define ENG_SCUMM 1
+ static int game=0;
-+#define GAME_OTHER -1
++#define GAME_OTHER -1
+#define GAME_LURE 1
+//#define GAME_SWORD1 2
+//#define GAME_SWORD2 3
+ if (!engine){
+ // one time initialization
-+ Common::String gameid(ConfMan.get("gameid"));
++ Common::String gameid(ConfMan.get("gameid"));
+ if (gameid == "lure") {
+ game=GAME_LURE;
+ engine=ENG_OTHER;
@@ -673,7 +673,7 @@ diff -Naur scummvm-0.11.orig/debian/scummvm.substvars scummvm-0.11/debian/scummv
+ }
+ // engine specific mappings
+ switch (engine){
-+
++
+ }
+ // game specific mapping
+ switch (game) {
@@ -687,13 +687,13 @@ diff -Naur scummvm-0.11.orig/debian/scummvm.substvars scummvm-0.11/debian/scummv
+ break;
+ case SDLK_F4: // map menu to right click
+ event.type = ((ev.type==SDL_KEYUP) ? Common::EVENT_RBUTTONUP : Common::EVENT_RBUTTONDOWN );
-+ event.mouse.x = _mouseCurState.x;
-+ event.mouse.y = _mouseCurState.y;
-+ return true;
++ event.mouse.x = _mouseCurState.x;
++ event.mouse.y = _mouseCurState.y;
++ return true;
+ default:
+ ;
+ }
-+ break;
++ break;
+ }
+#endif //SDL_MAEMO
+
diff --git a/backends/platform/ps2/Gs2dScreen.cpp b/backends/platform/ps2/Gs2dScreen.cpp
index 1de3c5e8c8..e42def535c 100644
--- a/backends/platform/ps2/Gs2dScreen.cpp
+++ b/backends/platform/ps2/Gs2dScreen.cpp
@@ -149,7 +149,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_videoMode = tvMode;
printf("Setting up %s mode\n", (_videoMode == TV_PAL) ? "PAL" : "NTSC");
-
+
// set screen size, 640x544 for pal, 640x448 for ntsc
_tvWidth = 640;
_tvHeight = ((_videoMode == TV_PAL) ? 544 : 448);
@@ -175,7 +175,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
_clutPtrs[TEXT] = _clutPtrs[SCREEN] + 0x2000;
_texPtrs[SCREEN] = _clutPtrs[SCREEN] + 0x3000;
_texPtrs[TEXT] = 0; // these buffers are stored in the alpha gaps of the frame buffers
- _texPtrs[MOUSE] = 128 * 256 * 4;
+ _texPtrs[MOUSE] = 128 * 256 * 4;
_texPtrs[PRINTF] = _texPtrs[MOUSE] + M_SIZE * M_SIZE * 4;
_showOverlay = false;
@@ -224,7 +224,7 @@ Gs2dScreen::Gs2dScreen(uint16 width, uint16 height, TVMode tvMode) {
updateScreen();
createAnimTextures();
-
+
// create anim thread
ee_thread_t animThread, thisThread;
ReferThreadStatus(GetThreadId(), &thisThread);
@@ -621,7 +621,7 @@ void Gs2dScreen::animThread(void) {
do {
WaitSema(g_AnimSema);
} while ((!_systemQuit) && (!g_RunAnim));
-
+
if (_systemQuit)
break;
@@ -746,7 +746,7 @@ const uint32 Gs2dScreen::_binaryClut[16] __attribute__((aligned(64))) = {
GS_RGBA( 0, 0, 0, 0x20), // scrPrintf: semitransparent
GS_RGBA(0xC0, 0xC0, 0xC0, 0), // scrPrintf: red
GS_RGBA(0x16, 0x16, 0xF0, 0), // scrPrintf: blue
-
+
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), // unused
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80),
GS_RGBA(0xFF, 0xFF, 0xFF, 0x80), GS_RGBA(0xFF, 0xFF, 0xFF, 0x80),
diff --git a/backends/platform/ps2/cd.c b/backends/platform/ps2/cd.c
index 5694d9a960..cd44b3d034 100644
--- a/backends/platform/ps2/cd.c
+++ b/backends/platform/ps2/cd.c
@@ -29,7 +29,7 @@ int cdvdInit(int mode)
u8 *pkt;
cdvdCd.server = NULL;
-
+
do {
if ((ret = SifBindRpc(&cdvdCd, CDVD_INIT_BIND_RPC, 0)) < 0) {
return -1;
@@ -40,14 +40,14 @@ int cdvdInit(int mode)
}
while(!cdvdCd.server);
- pkt = sendBuffer;
+ pkt = sendBuffer;
PUSHDATA( int, pkt, mode, i);
pkt += i; len += i;
if ((ret = SifCallRpc(&cdvdCd, 0, 0, sendBuffer, len, NULL, 0, 0, 0)) < 0)
return -1;
-
+
cdvdInitialised = 1;
-
+
return 0;
}
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
index e5eb76fdc8..b423b44a1d 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/codyvdfs.c
@@ -76,7 +76,7 @@ int cacheEnterDir(ISODirectoryRecord *dir) {
cacheName = cachedDir + strlen(cachedDir);
memcpy(cacheName, dir->name, dir->len_fi);
cacheName[dir->len_fi] = '/';
- cacheName[dir->len_fi + 1] = '\0';
+ cacheName[dir->len_fi + 1] = '\0';
return cdReadSectors(cachedDirLba, 1, cacheBuf, &rmode);
}
@@ -144,7 +144,7 @@ ISODirectoryRecord *findPath(const char *path) {
initRootCache();
return (ISODirectoryRecord *)cacheBuf;
}
-
+
do {
tok = strchr(path, '/');
if (tok)
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
index 75d4adf128..592f9ca61f 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/fiofs.c
@@ -159,7 +159,7 @@ int cd_read(iop_file_t *handle, void *dest, int length) {
doCopy = 0x800 - readPos;
if (doCopy > bytesLeft)
doCopy = bytesLeft;
-
+
memcpy(destPos, fd->buf + readPos, doCopy);
readPos += doCopy;
readLba += readPos >> 11;
@@ -177,7 +177,7 @@ int cd_read(iop_file_t *handle, void *dest, int length) {
bytesLeft &= 0x7FF;
}
}
- return destPos - (uint8*)dest;
+ return destPos - (uint8*)dest;
}
int cd_close(iop_file_t *handle) {
@@ -201,7 +201,7 @@ int cd_dopen(iop_file_t *handle, const char *path) {
return -ENOENT;
fdSlot = allocDioHandle();
-
+
if (fdSlot < 0)
return -ENFILE;
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
index d3ed3b0442..eb85e04462 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/imports.lst
@@ -24,10 +24,10 @@ I_DelDrv
iomanX_IMPORTS_end
sifcmd_IMPORTS_start
-I_sceSifInitRpc
-I_sceSifSetRpcQueue
-I_sceSifRegisterRpc
-I_sceSifRpcLoop
+I_sceSifInitRpc
+I_sceSifSetRpcQueue
+I_sceSifRegisterRpc
+I_sceSifRpcLoop
sifcmd_IMPORTS_end
stdio_IMPORTS_start
@@ -59,7 +59,7 @@ thbase_IMPORTS_start
I_CreateThread
I_StartThread
I_GetThreadId
-I_DelayThread
+I_DelayThread
thbase_IMPORTS_end
diff --git a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
index c46d452d2c..a9bfd636c7 100644
--- a/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
+++ b/backends/platform/ps2/iop/CoDyVDfs/iop/rpcfs.c
@@ -48,7 +48,7 @@ int initRpc(void) {
thread.attr = 0;
tid = CreateThread(&thread);
- if (tid >= 0)
+ if (tid >= 0)
StartThread(tid, 0);
else {
printf("Unable to start RPC Thread!\n");
diff --git a/backends/platform/ps2/irxboot.cpp b/backends/platform/ps2/irxboot.cpp
index 5c2cc8fa4c..01dc544f24 100644
--- a/backends/platform/ps2/irxboot.cpp
+++ b/backends/platform/ps2/irxboot.cpp
@@ -75,7 +75,7 @@ BootDevice detectBootPath(const char *elfPath, char *bootPath) {
device = OTHER;
sioprintf("elf path: %s, device %d", elfPath, device);
-
+
strcpy(bootPath, elfPath);
char *pathPos = bootPath;
@@ -117,7 +117,7 @@ BootDevice detectBootPath(const char *elfPath, char *bootPath) {
return device;
}
-int loadIrxModules(int device, const char *irxPath, IrxReference **modules) {
+int loadIrxModules(int device, const char *irxPath, IrxReference **modules) {
IrxReference *resModules = (IrxReference *)malloc(numIrxFiles * sizeof(IrxReference));
IrxReference *curModule = resModules;
diff --git a/backends/platform/ps2/savefile.cpp b/backends/platform/ps2/savefile.cpp
index 3865278788..425a4ae09f 100644
--- a/backends/platform/ps2/savefile.cpp
+++ b/backends/platform/ps2/savefile.cpp
@@ -56,7 +56,7 @@ public:
int read(int fd, void *buf, int size);
int write(int fd, const void *buf, int size);
int mkDir(const char *name);
- int getDir(const char *name, unsigned int mode, int max, void *dest);
+ int getDir(const char *name, unsigned int mode, int max, void *dest);
int getInfo(int *type, int *free, int *format);
int remove(const char *name);
private:
@@ -290,7 +290,7 @@ Ps2SaveFileManager::Ps2SaveFileManager(OSystem_PS2 *system, Gs2dScreen *screen)
saveThread.initial_priority = thisThread.current_priority + 1;
saveThread.stack_size = 8 * 1024;
- _autoSaveStack = malloc(saveThread.stack_size);
+ _autoSaveStack = malloc(saveThread.stack_size);
saveThread.stack = _autoSaveStack;
saveThread.func = (void *)runSaveThread;
saveThread.gp_reg = &_gp;
diff --git a/backends/platform/ps2/savefile.h b/backends/platform/ps2/savefile.h
index f72177e7ca..b6019192ae 100644
--- a/backends/platform/ps2/savefile.h
+++ b/backends/platform/ps2/savefile.h
@@ -45,7 +45,7 @@ public:
void writeSaveNonblocking(char *name, void *buf, uint32 size);
void saveThread(void);
void quit(void);
-
+
private:
bool setupIcon(const char *dest, const char *ico, const char *descr1, const char *descr2);
diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp
index f842874850..59b05c8e0b 100644
--- a/backends/platform/ps2/systemps2.cpp
+++ b/backends/platform/ps2/systemps2.cpp
@@ -204,7 +204,7 @@ void OSystem_PS2::startIrxModules(int numModules, IrxReference *modules) {
}
} else
sioprintf("Module \"%s\" wasn't found: %d", modules[i].path, modules[i].errorCode);
-
+
if ((modules[i].errorCode < 0) || (res < 0) || (rv < 0)) {
if (!(modules[i].fileRef->flags & OPTIONAL)) {
if (modules[i].errorCode < 0)
@@ -215,7 +215,7 @@ void OSystem_PS2::startIrxModules(int numModules, IrxReference *modules) {
quit();
}
}
-
+
if (modules[i].buffer);
free(modules[i].buffer);
} else {
@@ -475,7 +475,7 @@ void OSystem_PS2::soundThread(void) {
SjPCM_Enqueue((short int*)soundBufL, (short int*)soundBufR, SMP_PER_BLOCK, 0);
bufferedSamples += SMP_PER_BLOCK;
}
- }
+ }
SignalSema(_soundSema);
}
free(soundBufL);
@@ -710,7 +710,7 @@ void OSystem_PS2::msgPrintf(int millis, char *format, ...) {
while ((*lnEnd) && (*lnEnd != '\n'))
lnEnd++;
*lnEnd = '\0';
-
+
Common::String str(lnSta);
int width = Graphics::g_sysfont.getStringWidth(str);
if (width > maxWidth)
diff --git a/backends/platform/psp/Makefile b/backends/platform/psp/Makefile
index 1406e560a6..2ff47e057b 100644
--- a/backends/platform/psp/Makefile
+++ b/backends/platform/psp/Makefile
@@ -35,14 +35,14 @@ endif
INCDIR := $(srcdir) . $(srcdir)/engines/ . $(PSPSDK)/include
LIBDIR := $(LIBDIR) . $(PSPSDK)/lib
-CXXFLAGS = -O2 -Wall -D__PSP__ -DNONSTANDARD_PORT -DUSE_ZLIB -Wno-multichar `$(PSPBIN)/sdl-config --cflags`
+CXXFLAGS = -O2 -Wall -D__PSP__ -DNONSTANDARD_PORT -DUSE_ZLIB -Wno-multichar `$(PSPBIN)/sdl-config --cflags`
CXXFLAGS:= $(addprefix -I,$(INCDIR)) $(CXXFLAGS)
LDFLAGS := $(addprefix -L,$(LIBDIR)) $(LDFLAGS)
-LIBS =
+LIBS =
#comment this out if you don't want to use libmad
CXXFLAGS+= -DUSE_MAD
-LIBS += -lmad
+LIBS += -lmad
#comment this out if you don't want to use libtremor
CXXFLAGS+= -DUSE_VORBIS -DUSE_TREMOR
diff --git a/backends/platform/psp/README.PSP b/backends/platform/psp/README.PSP
index 12d26f5ac4..9fff9178bd 100644
--- a/backends/platform/psp/README.PSP
+++ b/backends/platform/psp/README.PSP
@@ -1,4 +1,4 @@
-ScummVM-PSP 0.10.0SVN README
+ScummVM-PSP 0.10.0SVN README
===========================
Installation
@@ -13,7 +13,7 @@ Controls
========
Left trigger - ESC
-Right trigger - Enter
+Right trigger - Enter
Analog - Mouse movement
Directionals - Mouse movement
Analog + triangle - Fine control mouse
@@ -58,7 +58,7 @@ A: If your version of Monkey Island came on a CD then it has the music
to the same directory as the game datafiles for music to work.
Q: Game X crashes, or feature Y doesn't work. Can you fix this?
-A: Possibly.
+A: Possibly.
Because of the large amount of games ScummVM supports we obviously haven't
played them all start-to-finish on the PSP, so it's possible there
are bugs or issues that we're not aware of.
diff --git a/backends/platform/psp/kbd_l_c.cpp b/backends/platform/psp/kbd_l_c.cpp
index 5f10da0611..7ea51461b8 100644
--- a/backends/platform/psp/kbd_l_c.cpp
+++ b/backends/platform/psp/kbd_l_c.cpp
@@ -3,211 +3,211 @@
unsigned int size_keyboard_letters_compressed = 3271;
unsigned char keyboard_letters_compressed[] __attribute__((aligned(16))) = {
- 0x78, 0x9c, 0xed, 0x9d, 0x69, 0x97, 0xb4, 0x36, 0x0e, 0x46, 0x99, 0xec, 0x99, 0xc9, 0x32, 0x93,
- 0x3d, 0xb3, 0xfd, 0xff, 0x5f, 0x48, 0xbe, 0xe6, 0xa4, 0xbb, 0x0b, 0x4b, 0xb2, 0x24, 0xdb, 0xd8,
- 0x66, 0x11, 0xcf, 0x3d, 0x27, 0xd5, 0x14, 0x16, 0xc6, 0x70, 0xb1, 0x31, 0xa6, 0x9c, 0xf7, 0x8f,
- 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x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f, 0xdf, 0x30, 0x49, 0x71, 0xbf, 0xbb,
+ 0xa4, 0xb8, 0xdf, 0x5c, 0x52, 0xdc, 0xaf, 0x2e, 0x29, 0xee, 0x17, 0x97, 0x14, 0xf7, 0xb3, 0x4b,
+ 0x8a, 0xfb, 0xc9, 0x25, 0xc5, 0xfd, 0xe8, 0x92, 0xe2, 0x7e, 0x70, 0x11, 0x1a, 0x4d, 0x84, 0x46,
+ 0x13, 0xf8, 0x85, 0x5f, 0xf8, 0x7d, 0x92, 0x5f, 0xcc, 0x4f, 0x51, 0xf5, 0x86, 0x99, 0x9f, 0x82,
+ 0xf9, 0x65, 0xba, 0xde, 0x30, 0xf3, 0xcb, 0xc0, 0xcd, 0x81, 0xdf, 0xd8, 0xc0, 0x6f, 0x6c, 0x34,
+ 0xbf, 0x10, 0x1c, 0x06, 0x55, 0x2f, 0xfc, 0x86, 0x41, 0xf7, 0x0b, 0xc1, 0x41, 0x30, 0xf4, 0xc2,
+ 0x6f, 0x10, 0x2c, 0xbf, 0x10, 0x1c, 0x02, 0x53, 0x2f, 0x0c, 0x07, 0xc0, 0xb3, 0x0b, 0xc3, 0x77,
+ 0xa7, 0x64, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0xc2, 0x9f, 0xfe, 0xbb, 0x89, 0xf5
};
#endif
diff --git a/backends/platform/psp/kbd_ls_c.cpp b/backends/platform/psp/kbd_ls_c.cpp
index 6f199377c0..ede308173e 100644
--- a/backends/platform/psp/kbd_ls_c.cpp
+++ b/backends/platform/psp/kbd_ls_c.cpp
@@ -3,222 +3,222 @@
unsigned int size_keyboard_letters_shift_compressed = 3450;
unsigned char keyboard_letters_shift_compressed[] __attribute__((aligned(16))) = {
- 0x78, 0x9c, 0xed, 0x9d, 0xe9, 0xb6, 0xab, 0x38, 0x0e, 0x46, 0xe9, 0xae, 0xb9, 0xbb, 0x86, 0xee,
- 0x9a, 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x7c, 0x5a, 0x9e, 0xe6, 0x57, 0xf4, 0xeb, 0x26, 0xdf, 0x1f, 0x95, 0xfd, 0x8a, 0xae,
+ 0xf6, 0xb4, 0xeb, 0xaf, 0x00, 0xcf, 0x07, 0x47, 0x3f, 0x1f, 0x2c, 0xf4, 0xaf, 0x04, 0xf0, 0x7b,
+ 0x37, 0xbf, 0x6a, 0x02, 0xfc, 0xea, 0x09, 0xf0, 0x0b, 0xbf, 0x1f, 0xbc, 0xa5, 0x5f, 0x93, 0x14,
+ 0xf7, 0x87, 0x4b, 0x8a, 0xfb, 0xdd, 0x25, 0xc5, 0xfd, 0xe6, 0x92, 0xe2, 0x7e, 0x75, 0x49, 0x71,
+ 0xbf, 0xb8, 0xa4, 0xb8, 0x9f, 0x5d, 0x52, 0xdc, 0x4f, 0x2e, 0x29, 0xee, 0x47, 0x17, 0xa1, 0xd1,
+ 0x44, 0x68, 0x34, 0x81, 0x5f, 0xf8, 0x85, 0xdf, 0x77, 0xf2, 0x8b, 0xf9, 0x29, 0xaa, 0xde, 0x30,
+ 0xf3, 0x53, 0x30, 0xbf, 0x4c, 0xd7, 0x1b, 0x66, 0x7e, 0x19, 0xb8, 0x39, 0xf0, 0x1b, 0x1b, 0xf8,
+ 0x8d, 0x8d, 0xe6, 0x17, 0x82, 0xc3, 0xa0, 0xea, 0x85, 0xdf, 0x30, 0xe8, 0x7e, 0x21, 0x38, 0x08,
+ 0x86, 0x5e, 0xf8, 0x0d, 0x82, 0xe5, 0x17, 0x82, 0x43, 0x60, 0xea, 0x85, 0xe1, 0x00, 0x78, 0x76,
+ 0x61, 0xf8, 0xee, 0x94, 0xec, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x5d, 0xf8, 0x3f, 0x67, 0xcc, 0x42, 0xb8
};
#endif
diff --git a/backends/platform/psp/kbd_s_c.cpp b/backends/platform/psp/kbd_s_c.cpp
index cf745b64b0..c2669ef542 100644
--- a/backends/platform/psp/kbd_s_c.cpp
+++ b/backends/platform/psp/kbd_s_c.cpp
@@ -3,204 +3,204 @@
unsigned int size_keyboard_symbols_compressed = 3155;
unsigned char keyboard_symbols_compressed[] __attribute__((aligned(16))) = {
- 0x78, 0x9c, 0xed, 0x9d, 0xe9, 0xb6, 0xac, 0x36, 0x0e, 0x46, 0xe9, 0xcc, 0xe9, 0x4c, 0xdd, 0x99,
- 0xa7, 0xee, 0xf7, 0x7f, 0x42, 0xf2, 0x37, 0x2b, 0xe7, 0x9e, 0x02, 0x49, 0x96, 0x64, 0x1b, 0x0f,
- 0x80, 0xf8, 0xf6, 0x5a, 0xa9, 0x43, 0x61, 0xd9, 0x18, 0x36, 0x18, 0x63, 0xca, 0x37, 0x7f, 0xfd,
- 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x8d, 0x58, 0xc1, 0x8d,
- 0x81, 0xdd, 0xe8, 0xc0, 0x6e, 0x74, 0xa0, 0x37, 0x38, 0xf0, 0x1b, 0x1b, 0xe8, 0x0d, 0x0e, 0xfc,
- 0xc6, 0x06, 0x7a, 0x83, 0x03, 0xbf, 0xb1, 0x81, 0xdf, 0xd8, 0xe4, 0xfc, 0xfe, 0xcb, 0x84, 0x97,
- 0xf3, 0x91, 0x09, 0x8f, 0xfb, 0xd8, 0x84, 0xc7, 0x7d, 0x62, 0xc2, 0xe3, 0x3e, 0x35, 0xe1, 0x71,
- 0x9f, 0x99, 0xf0, 0xb8, 0xcf, 0x4d, 0x78, 0xdc, 0x17, 0x26, 0x3c, 0xee, 0x4b, 0x13, 0x1e, 0xf7,
- 0x6f, 0x13, 0x1e, 0xf7, 0x95, 0xc9, 0xaa, 0x92, 0xf1, 0x6b, 0xeb, 0xe5, 0x82, 0x6d, 0xbd, 0x5c,
- 0xb0, 0xad, 0x97, 0x0b, 0xb6, 0xf5, 0x72, 0xc1, 0xb6, 0x5e, 0x2e, 0x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0x80, 0x5f, 0x4e, 0x17, 0xbf,
+ 0xe4, 0x8c, 0x81, 0xdf, 0x3b, 0xf9, 0x35, 0x13, 0xf0, 0xfc, 0xab, 0x27, 0xc0, 0xaf, 0x9e, 0x00,
+ 0xbf, 0x7a, 0x02, 0xfc, 0x3a, 0x7e, 0x4d, 0xf6, 0xb8, 0xdf, 0x5c, 0xf6, 0xb8, 0x5f, 0x5d, 0xf6,
+ 0xb8, 0x5f, 0x5c, 0xf6, 0xb8, 0x9f, 0x5d, 0xf6, 0xb8, 0x9f, 0x5c, 0xf6, 0xb8, 0x1f, 0x5d, 0xf6,
+ 0xb8, 0x1f, 0x5c, 0xf6, 0xb8, 0xef, 0x5d, 0x84, 0x46, 0x13, 0xa1, 0xd1, 0x04, 0x7e, 0xe1, 0x17,
+ 0x7e, 0x9f, 0xe4, 0x17, 0xf3, 0x53, 0x54, 0xbd, 0x61, 0xe6, 0xa7, 0x60, 0x7e, 0x99, 0xae, 0x37,
+ 0xcc, 0xfc, 0x32, 0x70, 0x73, 0xe0, 0x37, 0x36, 0xf0, 0x1b, 0x1b, 0xcd, 0x2f, 0x04, 0x87, 0x41,
+ 0xd5, 0x0b, 0xbf, 0x61, 0xd0, 0xfd, 0x42, 0x70, 0x10, 0x0c, 0xbd, 0xf0, 0x1b, 0x04, 0xcb, 0x2f,
+ 0x04, 0x87, 0xc0, 0xd4, 0x0b, 0xc3, 0x01, 0xf0, 0xec, 0xc2, 0xf0, 0xdd, 0xc9, 0xd9, 0x05, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xba, 0xf0, 0x37, 0x6c,
+ 0x6c, 0x3d, 0x8c
};
#endif
diff --git a/backends/platform/psp/kbd_ss_c.cpp b/backends/platform/psp/kbd_ss_c.cpp
index 7c10227b2c..c8d0bd6111 100644
--- a/backends/platform/psp/kbd_ss_c.cpp
+++ b/backends/platform/psp/kbd_ss_c.cpp
@@ -3,210 +3,210 @@
unsigned int size_keyboard_symbols_shift_compressed = 3263;
unsigned char keyboard_symbols_shift_compressed[] __attribute__((aligned(16))) = {
- 0x78, 0x9c, 0xed, 0x9d, 0xe9, 0xb6, 0xac, 0xb8, 0x0d, 0x46, 0x49, 0x0f, 0x49, 0x77, 0x7a, 0x4a,
- 0x7a, 0x1e, 0x92, 0xbc, 0xff, 0x13, 0xd2, 0x7f, 0xd3, 0xe7, 0x9c, 0x02, 0x4b, 0xb2, 0x24, 0x1b,
- 0x6c, 0x33, 0x88, 0x6f, 0xaf, 0x75, 0xab, 0x28, 0x90, 0x8d, 0x8b, 0x5d, 0x36, 0xc6, 0xe0, 0x73,
- 0xff, 0xfc, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x1b, 0x31,
- 0x83, 0x1b, 0x03, 0xbb, 0xd1, 0x81, 0xdd, 0xe8, 0x40, 0x6f, 0x70, 0xe0, 0x37, 0x36, 0xd0, 0x1b,
- 0x1c, 0xf8, 0x8d, 0x0d, 0xf4, 0x06, 0x07, 0x7e, 0x63, 0x03, 0xbf, 0xb1, 0x29, 0xf9, 0xfd, 0x9b,
- 0x09, 0xcf, 0xe7, 0x13, 0x13, 0x1e, 0xf7, 0xa9, 0x09, 0x8f, 0xfb, 0xcc, 0x84, 0xc7, 0x7d, 0x6e,
- 0xc2, 0xe3, 0xfe, 0x6e, 0xc2, 0xe3, 0xfe, 0x61, 0xc2, 0xe3, 0xbe, 0x30, 0xe1, 0x71, 0x5f, 0x9a,
- 0xf0, 0xb8, 0x7f, 0x9a, 0xf0, 0xb8, 0xaf, 0x4c, 0x66, 0x95, 0x82, 0x5f, 0x5b, 0x2f, 0x17, 0x6c,
- 0xeb, 0xe5, 0x82, 0x6d, 0xbd, 0x5c, 0xb0, 0xad, 0x97, 0x0b, 0xb6, 0xf5, 0x72, 0xc1, 0xb6, 0x5e,
- 0x2e, 0xd8, 0xd6, 0xcb, 0x05, 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 0x00, 0x00, 0xe8, 0xc2, 0xff, 0x01, 0x7c, 0x20, 0xed, 0x46
};
#endif
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index 8856dcc77b..480b0f31bf 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -94,7 +94,7 @@ OSystem_PSP::~OSystem_PSP() {
void OSystem_PSP::initBackend() {
- _savefile = new DefaultSaveFileManager();
+ _savefile = new DefaultSaveFileManager();
_mixer = new Audio::Mixer();
_timer = new DefaultTimerManager();
setSoundCallback(Audio::Mixer::mixCallback, _mixer);
@@ -141,7 +141,7 @@ void OSystem_PSP::initSize(uint width, uint height) {
_overlayHeight = _screenHeight = height;
free(_offscreen);
-
+
_offscreen = (byte *)malloc(width * height);
free(_overlayBuffer);
@@ -194,8 +194,8 @@ void OSystem_PSP::copyRectToScreen(const byte *buf, int pitch, int x, int y, int
if (w <= 0 || h <= 0)
return;
-
-
+
+
byte *dst = _offscreen + y * _screenWidth + x;
if (_screenWidth == pitch && pitch == w) {
memcpy(dst, buf, h * w);
@@ -227,7 +227,7 @@ void OSystem_PSP::updateScreen() {
uint xStart = (SCREEN_WIDTH >> 1) - (_screenWidth >> 1);
uint yStart = (SCREEN_HEIGHT >> 1) - (_screenHeight >> 1);
-
+
for (int i = 0; i < _screenHeight; ++i) {
for (int j = 0; j < _screenWidth; ++j) {
putPixel(xStart + j, yStart + i, _palette[_offscreen[i * _screenWidth +j]]);
@@ -302,7 +302,7 @@ void OSystem_PSP::grabOverlay(OverlayColor *buf, int pitch) {
void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) {
PSPDebugTrace("copyRectToOverlay\n");
-
+
//Clip the coordinates
if (x < 0) {
w += x;
@@ -327,7 +327,7 @@ void OSystem_PSP::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, i
if (w <= 0 || h <= 0)
return;
-
+
OverlayColor *dst = _overlayBuffer + (y * _overlayWidth + x);
if (_overlayWidth == pitch && pitch == w) {
memcpy(dst, buf, h * w * sizeof(OverlayColor));
@@ -357,7 +357,7 @@ void OSystem_PSP::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) {
g = (((color >> 5) & 0x1F) << 3);
b = (((color >> 10) & 0x1F) << 3);
}
-
+
OverlayColor OSystem_PSP::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) {
OverlayColor color = RGBToColor(r, g, b);
@@ -384,11 +384,11 @@ void OSystem_PSP::grabPalette(byte *colors, uint start, uint num) {
*colors++ = ((color & 0x1F) << 3);
*colors++ = (((color >> 5) & 0x1F) << 3);
*colors++ = (((color >> 10) & 0x1F) << 3);
- *colors++ = (color & 0x8000 ? 255 : 0);
+ *colors++ = (color & 0x8000 ? 255 : 0);
}
}
-bool OSystem_PSP::showMouse(bool visible) {
+bool OSystem_PSP::showMouse(bool visible) {
bool last = _mouseVisible;
_mouseVisible = visible;
return last;
@@ -423,7 +423,7 @@ void OSystem_PSP::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX,
bool OSystem_PSP::pollEvent(Common::Event &event) {
s8 analogStepAmountX = 0;
s8 analogStepAmountY = 0;
-/*
+/*
SceCtrlData pad;
sceCtrlSetSamplingCycle(0);
@@ -443,7 +443,7 @@ bool OSystem_PSP::pollEvent(Common::Event &event) {
//any of the other buttons.
event.type = buttonsChanged & pad.Buttons ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP;
event.kbd.flags = 0;
-
+
if (buttonsChanged & PSP_CTRL_LTRIGGER) {
event.kbd.keycode = Common::KEYCODE_ESCAPE;
event.kbd.ascii = 27;
@@ -460,35 +460,35 @@ bool OSystem_PSP::pollEvent(Common::Event &event) {
event.kbd.keycode = Common::KEYCODE_PERIOD;
event.kbd.ascii = '.';
}
-
+
}
-
+
event.mouse.x = _mouseX;
event.mouse.y = _mouseY;
_prevButtons = pad.Buttons;
return true;
}
-
+
uint32 time = getMillis();
if (time - _lastPadCheck > PAD_CHECK_TIME) {
_lastPadCheck = time;
int16 newX = _mouseX;
int16 newY = _mouseY;
-
+
if (pad.Lx < 100) {
analogStepAmountX = pad.Lx - 100;
}
else if (pad.Lx > 155) {
analogStepAmountX = pad.Lx - 155;
}
-
+
if (pad.Ly < 100) {
analogStepAmountY = pad.Ly - 100;
}
else if (pad.Ly > 155) {
analogStepAmountY = pad.Ly - 155;
}
-
+
if (pad.Buttons & PAD_DIR_MASK ||
analogStepAmountX != 0 || analogStepAmountY != 0) {
if (_prevButtons & PAD_DIR_MASK) {
@@ -506,7 +506,7 @@ bool OSystem_PSP::pollEvent(Common::Event &event) {
if (pad.Buttons & PSP_CTRL_DOWN)
newY += _padAccel >> 2;
- // If no movement then this has no effect
+ // If no movement then this has no effect
if (pad.Buttons & PSP_CTRL_TRIANGLE) {
// Fine control mode for analog
if (analogStepAmountX != 0)
@@ -514,7 +514,7 @@ bool OSystem_PSP::pollEvent(Common::Event &event) {
newX += analogStepAmountX - (analogStepAmountX - 1);
else
newX -= -analogStepAmountX - (-analogStepAmountX - 1);
-
+
if (analogStepAmountY != 0)
if (analogStepAmountY > 0)
newY += analogStepAmountY - (analogStepAmountY - 1);
@@ -531,21 +531,21 @@ bool OSystem_PSP::pollEvent(Common::Event &event) {
if (_overlayVisible)
{
if (newX >= _overlayWidth) newX = _overlayWidth - 1;
- if (newY >= _overlayHeight) newY = _overlayHeight - 1;
+ if (newY >= _overlayHeight) newY = _overlayHeight - 1;
}
else
{
if (newX >= _screenWidth) newX = _screenWidth - 1;
- if (newY >= _screenHeight) newY = _screenHeight - 1;
+ if (newY >= _screenHeight) newY = _screenHeight - 1;
}
-
+
if ((_mouseX != newX) || (_mouseY != newY)) {
event.type = Common::EVENT_MOUSEMOVE;
event.mouse.x = _mouseX = newX;
event.mouse.y = _mouseY = newY;
return true;
}
- } else {
+ } else {
//reset pad acceleration
_padAccel = 0;
}
@@ -558,7 +558,7 @@ uint32 OSystem_PSP::getMillis() {
return SDL_GetTicks();
}
-void OSystem_PSP::delayMillis(uint msecs) {
+void OSystem_PSP::delayMillis(uint msecs) {
SDL_Delay(msecs);
}
@@ -627,7 +627,7 @@ void OSystem_PSP::clearSoundCallback() {
}
int OSystem_PSP::getOutputSampleRate() const {
- return _samplesPerSec;
+ return _samplesPerSec;
}
void OSystem_PSP::quit() {
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index 78bdd5bd1e..d3e04289ae 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -51,9 +51,9 @@ protected:
uint16 _palette[256];
bool _overlayVisible;
uint32 _shakePos;
-
+
Graphics::Surface _framebuffer;
-
+
bool _mouseVisible;
int _mouseX, _mouseY;
int _mouseWidth, _mouseHeight;
@@ -64,7 +64,7 @@ protected:
uint32 _prevButtons;
uint32 _lastPadCheck;
uint32 _padAccel;
-
+
uint32 _samplesPerSec;
SceCtrlData pad;
diff --git a/backends/platform/psp/osys_psp_gu.cpp b/backends/platform/psp/osys_psp_gu.cpp
index bb14d07033..8925300c51 100644
--- a/backends/platform/psp/osys_psp_gu.cpp
+++ b/backends/platform/psp/osys_psp_gu.cpp
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
@@ -32,7 +32,7 @@
#define PSP_SCREEN_WIDTH 480
#define PSP_SCREEN_HEIGHT 272
#define PSP_FRAME_SIZE (BUF_WIDTH * PSP_SCREEN_HEIGHT * PIXEL_SIZE)
-#define MOUSE_SIZE 128
+#define MOUSE_SIZE 128
#define KBD_DATA_SIZE 130560
unsigned int __attribute__((aligned(16))) list[262144];
@@ -89,17 +89,17 @@ OSystem_PSP_GU::OSystem_PSP_GU() {
sceGuSync(0,0);
sceDisplayWaitVblankStart();
- sceGuDisplay(1);
+ sceGuDisplay(1);
//decompress keyboard data
uLongf kbdSize = KBD_DATA_SIZE;
keyboard_letters = (unsigned char *)memalign(16, KBD_DATA_SIZE);
assert(Z_OK == uncompress((Bytef *)keyboard_letters, &kbdSize, (const Bytef *)keyboard_letters_compressed, size_keyboard_letters_compressed));
-
+
kbdSize = KBD_DATA_SIZE;
keyboard_letters_shift = (unsigned char *)memalign(16, KBD_DATA_SIZE);
assert(Z_OK == uncompress((Bytef *)keyboard_letters_shift, &kbdSize, (const Bytef *)keyboard_letters_shift_compressed, size_keyboard_letters_shift_compressed));
-
+
kbdSize = KBD_DATA_SIZE;
keyboard_symbols = (unsigned char *)memalign(16, KBD_DATA_SIZE);
assert(Z_OK == uncompress((Bytef *)keyboard_symbols, &kbdSize, (const Bytef *)keyboard_symbols_compressed, size_keyboard_symbols_compressed));
@@ -107,7 +107,7 @@ OSystem_PSP_GU::OSystem_PSP_GU() {
kbdSize = KBD_DATA_SIZE;
keyboard_symbols_shift = (unsigned char *)memalign(16, KBD_DATA_SIZE);
assert(Z_OK == uncompress((Bytef *)keyboard_symbols_shift, &kbdSize, (const Bytef *)keyboard_symbols_shift_compressed, size_keyboard_symbols_shift_compressed));
-
+
_keyboardVisible = false;
_clut = (unsigned short*)(((unsigned int)clut256)|0x40000000);
_kbdClut = (unsigned short*)(((unsigned int)kbClut)|0x40000000);
@@ -124,7 +124,7 @@ OSystem_PSP_GU::~OSystem_PSP_GU() {
free(keyboard_symbols);
free(keyboard_letters_shift);
free(keyboard_letters);
-
+
_offscreen = 0;
_overlayBuffer = 0;
_mouseBuf = 0;
@@ -195,7 +195,7 @@ void OSystem_PSP_GU::setMouseCursor(const byte *buf, uint w, uint h, int hotspot
memcpy(mouseClut, _palette, 256*sizeof(unsigned short));
mouseClut[_mouseKeyColour] = 0;
sceKernelDcacheWritebackAll();
-
+
for (unsigned int i=0;i<h;i++)
memcpy(_mouseBuf+i*MOUSE_SIZE, buf+i*w, w);
}
@@ -210,11 +210,11 @@ void OSystem_PSP_GU::setPalette(const byte *colors, uint start, uint num) {
//copy to CLUT
memcpy(_clut, _palette, 256*sizeof(unsigned short));
-
+
//force update of mouse CLUT as well, as it may have been set up before this palette was set
memcpy(mouseClut, _palette, 256*sizeof(unsigned short));
mouseClut[_mouseKeyColour] = 0;
-
+
sceKernelDcacheWritebackAll();
}
@@ -244,10 +244,10 @@ void OSystem_PSP_GU::copyRectToScreen(const byte *buf, int pitch, int x, int y,
if (w <= 0 || h <= 0)
return;
-
+
byte *dst = _offscreen + y * _screenWidth + x;
- if (_screenWidth == pitch && pitch == w)
+ if (_screenWidth == pitch && pitch == w)
{
memcpy(dst, buf, h * w);
/*
@@ -257,9 +257,9 @@ void OSystem_PSP_GU::copyRectToScreen(const byte *buf, int pitch, int x, int y,
sceGuSync(0,0);
*/
}
- else
+ else
{
- do
+ do
{
memcpy(dst, buf, w);
buf += pitch;
@@ -270,7 +270,7 @@ void OSystem_PSP_GU::copyRectToScreen(const byte *buf, int pitch, int x, int y,
void OSystem_PSP_GU::updateScreen() {
sceGuStart(0,list);
-
+
sceGuClearColor(0xff000000);
sceGuClear(GU_COLOR_BUFFER_BIT);
@@ -281,7 +281,7 @@ void OSystem_PSP_GU::updateScreen() {
sceGuTexImage(0, 512, 256, _screenWidth, _offscreen);
else
sceGuTexImage(0, 512, 512, _screenWidth, _offscreen);
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGB);
sceGuTexFilter(GU_LINEAR, GU_LINEAR);
sceGuTexOffset(0,0);
sceGuAmbientColor(0xffffffff);
@@ -321,8 +321,8 @@ void OSystem_PSP_GU::updateScreen() {
vertices[0].x += (vertices[1].x - vertices[0].x) * 511 / 640; vertices[0].y = 0; vertices[0].z = 0;
sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices);
}
-
-
+
+
// draw overlay
if (_overlayVisible) {
vertices[0].x = 0; vertices[0].y = 0; vertices[0].z = 0;
@@ -337,7 +337,7 @@ void OSystem_PSP_GU::updateScreen() {
else
sceGuTexImage(0, 512, 256, _overlayWidth, _overlayBuffer);
- sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
+ sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
sceGuDrawArray(GU_SPRITES,GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D,2,0,vertices);
// need to render twice for textures > 512
if ( _overlayWidth > 512) {
@@ -347,7 +347,7 @@ void OSystem_PSP_GU::updateScreen() {
sceGuDrawArray(GU_SPRITES, GU_TEXTURE_32BITF|GU_VERTEX_32BITF|GU_TRANSFORM_2D, 2, 0, vertices);
}
}
-
+
// draw mouse
if (_mouseVisible) {
sceGuTexMode(GU_PSM_T8, 0, 0, 0); // 8-bit image
@@ -356,15 +356,15 @@ void OSystem_PSP_GU::updateScreen() {
sceGuAlphaFunc(GU_GREATER,0,0xff);
sceGuEnable(GU_ALPHA_TEST);
sceGuTexImage(0, MOUSE_SIZE, MOUSE_SIZE, MOUSE_SIZE, _mouseBuf);
- sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
-
+ sceGuTexFunc(GU_TFX_MODULATE, GU_TCC_RGBA);
+
vertices[0].u = 0.5; vertices[0].v = 0.5;
vertices[1].u = _mouseWidth - 0.5; vertices[1].v = _mouseHeight - 0.5;
//adjust cursor position
int mX = _mouseX - _mouseHotspotX;
int mY = _mouseY - _mouseHotspotY;
-
+
if (_overlayVisible) {
float scalex, scaley;
@@ -394,7 +394,7 @@ void OSystem_PSP_GU::updateScreen() {
case CENTERED_362X272:
{
float scalex, scaley;
-
+
scalex = 362.0f / _screenWidth;
scaley = 272.0f / _screenHeight;
@@ -408,7 +408,7 @@ void OSystem_PSP_GU::updateScreen() {
scalex = (float)PSP_SCREEN_WIDTH / _screenWidth;
scaley = (float)PSP_SCREEN_HEIGHT / _screenHeight;
-
+
vertices[0].x = mX * scalex; vertices[0].y = mY * scaley; vertices[0].z = 0;
vertices[1].x = vertices[0].x + _mouseWidth * scalex; vertices[1].y = vertices[0].y + _mouseHeight * scaley; vertices[0].z = 0;
}
@@ -438,8 +438,8 @@ void OSystem_PSP_GU::updateScreen() {
sceGuTexImage(0, 512, 512, 480, keyboard_symbols_shift);
break;
}
- sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
-
+ sceGuTexFunc(GU_TFX_REPLACE, GU_TCC_RGBA);
+
vertices[0].u = 0.5; vertices[0].v = 0.5;
vertices[1].u = PSP_SCREEN_WIDTH-0.5; vertices[1].v = PSP_SCREEN_HEIGHT-0.5;
vertices[0].x = 0; vertices[0].y = 0; vertices[0].z = 0;
@@ -448,7 +448,7 @@ void OSystem_PSP_GU::updateScreen() {
sceGuDisable(GU_BLEND);
}
sceKernelDcacheWritebackAll();
-
+
sceGuFinish();
sceGuSync(0,0);
@@ -491,7 +491,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) {
_prevButtons = pad.Buttons;
return true;
}
-
+
if ( (buttonsChanged & PSP_CTRL_RIGHT) && !(pad.Buttons & PSP_CTRL_RIGHT)) {
event.kbd.flags = 0;
event.kbd.ascii = 0;
@@ -499,7 +499,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) {
_prevButtons = pad.Buttons;
return true;
}
-
+
if ( (buttonsChanged & PSP_CTRL_UP) && !(pad.Buttons & PSP_CTRL_UP)) {
event.kbd.flags = 0;
event.kbd.ascii = 0;
@@ -507,7 +507,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) {
_prevButtons = pad.Buttons;
return true;
}
-
+
if ( (buttonsChanged & PSP_CTRL_DOWN) && !(pad.Buttons & PSP_CTRL_DOWN)) {
event.kbd.flags = 0;
event.kbd.ascii = 0;
@@ -515,7 +515,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) {
_prevButtons = pad.Buttons;
return true;
}
-
+
// compute nub direction
x = pad.Lx-128;
y = pad.Ly-128;
@@ -527,7 +527,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) {
if (_keySelected < 1)
_keySelected += 30;
_kbdClut[_keySelected] = 0xffff;
-
+
if (buttonsChanged & PSP_CTRL_CROSS) {
event.type = (pad.Buttons & PSP_CTRL_CROSS) ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP;
if (_keySelected > 26) {
@@ -550,7 +550,7 @@ bool OSystem_PSP_GU::pollEvent(Common::Event &event) {
event.kbd.keycode = Common::KEYCODE_RETURN;
break;
}
- } else {
+ } else {
switch( _keyboardMode) {
case 0:
event.kbd.flags = 0;
diff --git a/backends/platform/psp/osys_psp_gu.h b/backends/platform/psp/osys_psp_gu.h
index af67be5185..e828a36b7d 100644
--- a/backends/platform/psp/osys_psp_gu.h
+++ b/backends/platform/psp/osys_psp_gu.h
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
*/
diff --git a/backends/platform/psp/portdefs.h b/backends/platform/psp/portdefs.h
index e6ba71fc64..af772230d7 100644
--- a/backends/platform/psp/portdefs.h
+++ b/backends/platform/psp/portdefs.h
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
diff --git a/backends/platform/psp/psp_main.cpp b/backends/platform/psp/psp_main.cpp
index 92d6beea74..d2ed59efbe 100644
--- a/backends/platform/psp/psp_main.cpp
+++ b/backends/platform/psp/psp_main.cpp
@@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* $URL$
* $Id$
@@ -126,7 +126,7 @@ int main(void)
SceUID fd = sceIoDopen(SCUMMVM_SAVEPATH);
if (fd < 0) {
//No? then let's create it.
- sceIoMkdir(SCUMMVM_SAVEPATH, 0777);
+ sceIoMkdir(SCUMMVM_SAVEPATH, 0777);
} else {
//it exists, so close it again.
sceIoDclose(fd);
@@ -141,7 +141,7 @@ int main(void)
int res = scummvm_main(argc, argv);
g_system->quit(); // TODO: Consider removing / replacing this!
-
+
sceKernelSleepThread();
return res;
diff --git a/backends/platform/psp/trace.cpp b/backends/platform/psp/trace.cpp
index 80ea98f8b6..a4a409d455 100644
--- a/backends/platform/psp/trace.cpp
+++ b/backends/platform/psp/trace.cpp
@@ -34,7 +34,7 @@ void PSPDebugTrace (const char *format, ...) {
va_list opt;
char buff[2048];
int bufsz, fd;
-
+
va_start(opt, format);
bufsz = vsnprintf( buff, (size_t) sizeof(buff), format, opt);
va_end(opt);
@@ -45,7 +45,7 @@ void PSPDebugTrace (const char *format, ...) {
{
return;
}
-
+
sceIoWrite(fd, (const void*)buff, bufsz);
sceIoClose(fd);
#endif
@@ -56,7 +56,7 @@ void PSPDebugTrace (const char * filename, const char *format, ...) {
va_list opt;
char buff[2048];
int bufsz, fd;
-
+
va_start(opt, format);
bufsz = vsnprintf( buff, (size_t) sizeof(buff), format, opt);
va_end(opt);
@@ -67,7 +67,7 @@ void PSPDebugTrace (const char * filename, const char *format, ...) {
{
return;
}
-
+
sceIoWrite(fd, (const void*)buff, bufsz);
sceIoClose(fd);
#endif
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index 7061f4a036..eb71a1ba0e 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -1147,12 +1147,12 @@ void OSystem_SDL::clearOverlay() {
SDL_LockSurface(_tmpscreen);
SDL_LockSurface(_overlayscreen);
- _scalerProc((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2, _tmpscreen->pitch,
+ _scalerProc((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2, _tmpscreen->pitch,
(byte *)_overlayscreen->pixels, _overlayscreen->pitch, _screenWidth, _screenHeight);
#ifndef DISABLE_SCALERS
if (_adjustAspectRatio)
- stretch200To240((uint8 *)_overlayscreen->pixels, _overlayscreen->pitch,
+ stretch200To240((uint8 *)_overlayscreen->pixels, _overlayscreen->pitch,
_overlayWidth, _screenHeight * _scaleFactor, 0, 0, 0);
#endif
SDL_UnlockSurface(_tmpscreen);
@@ -1264,7 +1264,7 @@ void OSystem_SDL::warpMouse(int x, int y) {
y1 = real2Aspect(y);
if (_mouseCurState.x != x || _mouseCurState.y != y) {
- if (!_overlayVisible)
+ if (!_overlayVisible)
SDL_WarpMouse(x * _scaleFactor, y1 * _scaleFactor);
else
SDL_WarpMouse(x, y1);
@@ -1352,7 +1352,7 @@ void OSystem_SDL::blitCursor() {
palette = _currentPalette;
else
palette = _cursorPalette;
-
+
for (i = 0; i < h; i++) {
for (j = 0; j < w; j++) {
color = *srcPtr;
@@ -1556,7 +1556,7 @@ void OSystem_SDL::drawMouse() {
if (_adjustAspectRatio && !_overlayVisible)
dst.y = real2Aspect(dst.y);
-
+
dst.x = scale * dst.x - _mouseCurState.rHotX;
dst.y = scale * dst.y - _mouseCurState.rHotY;
dst.w = _mouseCurState.rW;
diff --git a/backends/platform/sdl/main.cpp b/backends/platform/sdl/main.cpp
index afa4abb2b5..adb9cec08b 100644
--- a/backends/platform/sdl/main.cpp
+++ b/backends/platform/sdl/main.cpp
@@ -53,7 +53,7 @@ int main(int argc, char *argv[]) {
// Set up redirects for stdout/stderr under Windows and Symbian.
// Code copied from SDL_main.
//
-
+
// Symbian does not like any output to the console through any *print* function
char STDOUT_FILE[256], STDERR_FILE[256]; // shhh, don't tell anybody :)
strcpy(STDOUT_FILE, Symbian::GetExecutablePath());
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp
index 9e71ebe0a5..5ef31f9253 100644
--- a/backends/platform/sdl/sdl.cpp
+++ b/backends/platform/sdl/sdl.cpp
@@ -107,7 +107,7 @@ void OSystem_SDL::initBackend() {
printf("Using joystick: %s\n", SDL_JoystickName(0));
_joystick = SDL_JoystickOpen(joystick_num);
}
-
+
// Create the savefile manager, if none exists yet (we check for this to
// allow subclasses to provide their own).
@@ -136,7 +136,7 @@ void OSystem_SDL::initBackend() {
_timer = new DefaultTimerManager();
_timerID = SDL_AddTimer(10, &timer_handler, _timer);
}
-
+
// Invoke parent implementation of this method
OSystem::initBackend();
diff --git a/backends/platform/symbian/AdaptAllMMPs.pl b/backends/platform/symbian/AdaptAllMMPs.pl
index b9640e61c1..ae10a7ed72 100644
--- a/backends/platform/symbian/AdaptAllMMPs.pl
+++ b/backends/platform/symbian/AdaptAllMMPs.pl
@@ -6,29 +6,29 @@ chdir("../../../");
# list of project files to process
@mmp_files = (
- "mmp/scummvm_scumm.mmp",
- "mmp/scummvm_queen.mmp",
- "mmp/scummvm_agos.mmp",
- "mmp/scummvm_sky.mmp",
- "mmp/scummvm_gob.mmp",
- "mmp/scummvm_saga.mmp",
- "mmp/scummvm_kyra.mmp",
- "mmp/scummvm_sword1.mmp",
- "mmp/scummvm_sword2.mmp",
- "mmp/scummvm_lure.mmp",
- "mmp/scummvm_cine.mmp",
- "mmp/scummvm_agi.mmp",
- "mmp/scummvm_touche.mmp",
- "mmp/scummvm_parallaction.mmp",
- "mmp/scummvm_cruise.mmp",
- "mmp/scummvm_drascula.mmp",
- "mmp/scummvm_igor.mmp",
- "S60/ScummVM_S60.mmp",
- "S60v3/ScummVM_S60v3.mmp",
- "S80/ScummVM_S80.mmp",
+ "mmp/scummvm_scumm.mmp",
+ "mmp/scummvm_queen.mmp",
+ "mmp/scummvm_agos.mmp",
+ "mmp/scummvm_sky.mmp",
+ "mmp/scummvm_gob.mmp",
+ "mmp/scummvm_saga.mmp",
+ "mmp/scummvm_kyra.mmp",
+ "mmp/scummvm_sword1.mmp",
+ "mmp/scummvm_sword2.mmp",
+ "mmp/scummvm_lure.mmp",
+ "mmp/scummvm_cine.mmp",
+ "mmp/scummvm_agi.mmp",
+ "mmp/scummvm_touche.mmp",
+ "mmp/scummvm_parallaction.mmp",
+ "mmp/scummvm_cruise.mmp",
+ "mmp/scummvm_drascula.mmp",
+ "mmp/scummvm_igor.mmp",
+ "S60/ScummVM_S60.mmp",
+ "S60v3/ScummVM_S60v3.mmp",
+ "S80/ScummVM_S80.mmp",
"S90/ScummVM_S90.mmp",
- "UIQ2/ScummVM_UIQ2.mmp",
- "UIQ3/ScummVM_UIQ3.mmp"
+ "UIQ2/ScummVM_UIQ2.mmp",
+ "UIQ3/ScummVM_UIQ3.mmp"
);
# do this first to set all *.mmp & *.inf files to *.*.in states
@@ -50,12 +50,12 @@ Preparing to update all the Symbian MMP project files with objects from module.m
=======================================================================================
";
-
+
my @section_empty = (""); # section standard: no #ifdef's in module.mk files
my @sections_scumm = ("", "DISABLE_SCUMM_7_8", "DISABLE_HE"); # special sections for engine SCUMM
# files excluded from build, case insensitive, will be matched in filename string only
-my @excludes_snd = (
+my @excludes_snd = (
"mt32",
"fluidsynth",
"i386",
@@ -64,12 +64,12 @@ my @excludes_snd = (
"partialmanager.cpp",
"synth.cpp",
"tables.cpp",
- "freeverb.cpp"
-);
+ "freeverb.cpp"
+);
-my @excludes_graphics = (
+my @excludes_graphics = (
"iff.cpp"
-);
+);
my @excludes_scumm = (
"codec47ARM.cpp",
@@ -110,7 +110,7 @@ Done. Enjoy :P
##################################################################################################################
##################################################################################################################
-# parses multiple sections per mmp/module
+# parses multiple sections per mmp/module
sub ParseModule
{
my ($mmp,$module,$sections,$exclusions) = @_;
@@ -135,7 +135,7 @@ sub CheckForModuleMK
if (-d $item)
{
#print "$item\n";
-
+
opendir DIR, $item;
#my @Files = readdir DIR;
my @Files = grep s/^([^\.].*)$/$1/, readdir DIR;
@@ -153,7 +153,7 @@ sub CheckForModuleMK
my $sec = "";
my $ObjectsSelected = 0;
my $ObjectsTotal = 0;
-
+
print "$item for section '$section' ... ";
open FILE, $item;
@@ -162,10 +162,10 @@ sub CheckForModuleMK
my $count = @lines;
print "$count lines";
-
+
A: foreach $line (@lines)
{
- # found a section? reset
+ # found a section? reset
if ($line =~ /^ifndef (.*)/)
{
$sec = $1;
@@ -182,7 +182,7 @@ sub CheckForModuleMK
$line =~ s/ \\//; # remove possible trailing ' \'
$line =~ s/\//\\/g; # replace / with \
chop($line); # remove \n
-
+
# do we need to skip this file? According to our own @exclusions array
foreach $exclusion (@exclusions)
{
@@ -192,7 +192,7 @@ sub CheckForModuleMK
next A;
}
}
-
+
# do we need to skip this file? According to MACROs in .MMPs
foreach $DisableDefine (@DisableDefines)
{
@@ -202,7 +202,7 @@ sub CheckForModuleMK
next A;
}
}
-
+
$ObjectsSelected++;
#print "\n $line";
$output .= "SOURCE $line\n";
@@ -225,7 +225,7 @@ sub UpdateProjectFile
my $updated = " Updated @ ".localtime();
my $name;
my @mmp_files_plus_one = @mmp_files;
- unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
+ unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
foreach $name (@mmp_files_plus_one)
{
@@ -234,23 +234,23 @@ sub UpdateProjectFile
open FILE, "$file";
my @lines = <FILE>;
close FILE;
-
+
my $onestr = join("",@lines);
-
+
if ($onestr =~ /$n/)
{
print " - $name @ $n updating ... ";
-
+
$onestr =~ s/$a.*$b/$a$updated\n$output$b/s;
open FILE, ">$file";
print FILE $onestr;
close FILE;
-
+
print "done.\n";
}
}
-
+
$output = "";
}
@@ -260,7 +260,7 @@ sub UpdateSlaveMacros
{
my $updated = " Updated @ ".localtime();
- my $name = "mmp/scummvm_base.mmp";
+ my $name = "mmp/scummvm_base.mmp";
my $file = "$buildDir/$name";
print "Reading master MACROS from backends/symbian/$name ... ";
@@ -274,7 +274,7 @@ sub UpdateSlaveMacros
my $b = "\/\/STOP_$n\/\/";
$onestr =~ /$a(.*)$b/s;
my $macros = $1;
-
+
my $libs_first = "\n// automagically enabled static libs from macros above\n";
my $libs_second = "STATICLIBRARY scummvm_base.lib // must be above USE_* .libs\n";
my $macro_counter = 0;
@@ -287,7 +287,7 @@ sub UpdateSlaveMacros
if ($line =~ /^.*MACRO\s*([0-9A-Z_]*)\s*\/\/\s*LIB\:(.*)$/)
{
my $macro = $1; my $lib = $2;
-
+
# this macro enabled? then also add the .lib
if ($line =~ /^\s*MACRO\s*$macro/m)
{
@@ -298,10 +298,10 @@ sub UpdateSlaveMacros
{
# these are the non DISABLED_ libs
$libs_first .= "STATICLIBRARY $lib\n" if ($macro =~ /^DISABLE_/);
-
+
# add projects for BLD.INF's
my $projectname = substr("$lib",0,-4);
- $projects .= "..\\mmp\\$projectname.mmp\n" if ($macro =~ /^DISABLE_/);
+ $projects .= "..\\mmp\\$projectname.mmp\n" if ($macro =~ /^DISABLE_/);
}
$macro_counter++;
}
@@ -312,7 +312,7 @@ sub UpdateSlaveMacros
$macros2 .= "$line\n";
push @DisableDefines, $macro; # used in CheckForModuleMK()!!
}
- }
+ }
print "$macro_counter macro lines.\n";
@@ -323,23 +323,23 @@ sub UpdateSlaveMacros
$m = "AUTO_PROJECTS";
$p = "\/\/START_$m\/\/";
$q = "\/\/STOP_$m\/\/";
-
+
foreach $name (@mmp_files)
{
$file = "$buildDir/$name";
$fileBLDINF = $buildDir .'/'. substr($name, 0, rindex($name, "/")) . "/BLD.INF";
print "Updating macros in $file ... ";
#print "Updating macros in backends/symbian/$name ... ";
-
+
open FILE, "$file"; @lines = <FILE>; close FILE;
$onestr = join("",@lines);
-
+
my $extralibs = ""; # output
# slash in name means it's a phone specific build file: add LIBs
$extralibs .= "$libs_first$libs_second" if (-e $fileBLDINF);
-
+
$onestr =~ s/$a.*$b/$a$updated$macros2$extralibs$b/s;
-
+
open FILE, ">$file"; print FILE $onestr; close FILE;
my $count = @lines;
@@ -353,13 +353,13 @@ sub UpdateSlaveMacros
open FILE, "$fileBLDINF"; @lines = <FILE>; close FILE;
$onestr = join("",@lines);
-
+
$onestr =~ s/$p.*$q/$p$updated$projects$q/s;
-
+
open FILE, ">$fileBLDINF"; print FILE $onestr; close FILE;
}
}
-}
+}
##################################################################################################################
@@ -367,10 +367,10 @@ sub ResetProjectFiles()
{
my $onestr, @lines;
my @mmp_files_plus_one = @mmp_files;
-# unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
-
+# unshift @mmp_files_plus_one, "mmp/scummvm_base.mmp";
+
print "Resetting project files: ";
-
+
# we don't need to do mmp/scummvm_base.mmp", it was done in BuildPackageUpload.pl before the call to this script
foreach $name (@mmp_files_plus_one)
{
@@ -390,7 +390,7 @@ sub ResetProjectFiles()
$onestr = join("",@lines);
open FILE, ">$fileBLDINF"; print FILE $onestr; close FILE;
}
- }
+ }
print "... done.\n";
}
diff --git a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
index 7a4d6e21e2..7b07993c4e 100644
--- a/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
+++ b/backends/platform/symbian/BuildPackageUpload_AllVersions.pl
@@ -92,7 +92,7 @@ while( ($SDK, $Value) = each(%SDK_Variations) )
push @Packages, sprintf($file_tpl_sis, $version_tpl_sis, $SDK2, $Extra);
$PackagesQueued++;
}
- }
+ }
}
else
{
@@ -118,7 +118,7 @@ Preparing to Build, Package & Upload $PackagesQueued SymbianOS ScummVM variation
SDKs inst'd \t$SDKs ".( %SDK_LibraryDirs ? "
LIBs inst'd \t$LIBs " : "" )."
- $PackagesQueued Variations \t$PackagesStr
+ $PackagesQueued Variations \t$PackagesStr
DIR base \t$base_dir
build \t$build_dir
output \t$output_dir
@@ -126,7 +126,7 @@ Preparing to Build, Package & Upload $PackagesQueued SymbianOS ScummVM variation
FTP host \t$FTP_Host
user \t$FTP_User
pass \t"."*" x length($FTP_Pass)."
- dir \t$FTP_Dir
+ dir \t$FTP_Dir
" : "" )."
=======================================================================================
Press Ctrl-C to abort or enter to continue Build, Package & Upload $PackagesQueued Variations...
@@ -142,7 +142,7 @@ unlink($build_log_out);
unlink($build_log_err);
# init _base.mmp now, so we can start changing it without affecting the CVS version _base.mmp.in!
-my $name = "mmp/scummvm_base.mmp";
+my $name = "mmp/scummvm_base.mmp";
my $file = "$build_dir/$name";
open FILE, "$file.in"; @lines = <FILE>; close FILE;
my $onestr = join("",@lines);
@@ -164,7 +164,7 @@ while( ($SDK, $Value) = each(%SDK_LibraryDirs) )
$LibrariesQueued++;
DoLibrary($SDK2, $Library, $Path);
}
- }
+ }
}
else
{
@@ -194,7 +194,7 @@ while( ($SDK, $VariationsHash) = each(%SDK_Variations) )
{
DoVariation($SDK2, $Variation, $MacroBlock);
}
- }
+ }
}
else
{
@@ -248,7 +248,7 @@ print " SumthinWicked wishes you a ridiculously good and optimally happy d
##################################################################################################################
##################################################################################################################
-# Build, Package & Upload a single Variation
+# Build, Package & Upload a single Variation
sub DoLibrary
{
my ($SDK, $Library, $Path) = @_;
@@ -278,19 +278,19 @@ my $header = "
my $OK = 1;
PrepSdkPaths($SDK);
-
+
chdir($Path) or $OK=0;
PrintErrorMessage("Changing to $Path failed!") if (!$OK);
- return 0 if (!$OK);
+ return 0 if (!$OK);
PrintMessage("Cleaning for $Target") if (!$ReallyQuiet);
system("bldmake bldfiles > NUL 2> NUL");
PrintErrorMessage("'bldmake bldfiles' exited with value " . ($? >> 8)) if ($? >> 8);
system("abld clean $TargetName urel > NUL 2> NUL");
- PrintErrorMessage("'abld clean $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
+ PrintErrorMessage("'abld clean $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
# remove file so we are sure that after .lib generation we have a fresh copy!
if (-e $TargetFilePath) { unlink($TargetFilePath) or PrintErrorMessage("Removing $TargetFilePath"); }
-
+
my $Redirection = "OUT:file, ERR:".($RedirectSTDERR ? "file" : "screen");
my $Message = "Building $Target ($Redirection)";
PrintMessage($Message) if (!$ReallyQuiet);
@@ -302,14 +302,14 @@ my $header = "
$OK = 0 if ($? >> 8);
# print " STDERR: ".((-s $build_log_err)-$OldSize)." bytes output written to $build_log_err\n+--------------------------------------------------------------------------------------\n" if ($OldSize != (-s $build_log_err));
PrintErrorMessage("'abld build $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
- return 0 if (!$OK); # ABLD always returns ok :( grr
+ return 0 if (!$OK); # ABLD always returns ok :( grr
PrintMessage("Done.") if (!$ReallyQuiet);
# did it work? :)
if (-e $TargetFilePath)
{
$LibrariesSucceeded++;
-
+
if ($TargetIntermediatePath ne '' && $TargetIntermediatePath =~ /\\EPOC32\\BUILD\\/i) # make really sure it's a valid path!
{
system("del /S /Q $TargetIntermediatePath > NUL");
@@ -330,12 +330,12 @@ my $header = "
##################################################################################################################
-# Build, Package & Upload a single Variation
+# Build, Package & Upload a single Variation
sub DoVariation
{
my ($SDK, $Variation, $MacroBlock) = @_;
my $Extra = ($Variation ne '' ? "_$Variation" : "");
- my $Package = sprintf($file_tpl_sis, $version_tpl_sis, $SDK, $Extra);
+ my $Package = sprintf($file_tpl_sis, $version_tpl_sis, $SDK, $Extra);
if ($SkipExistingPackages && -f "$output_dir/$Package")
{
@@ -366,7 +366,7 @@ my $header = "
if ($OK)
{
$OK = BuildVariation($SDK, $Variation, $Package, $MacroBlock);
-
+
if ($OK && $FTP_Host ne '')
{
UploadVariation($SDK, $Variation, $Package);
@@ -382,17 +382,17 @@ sub PrepVariation()
my $OK = 1;
PrepSdkPaths($SDK);
-
+
chdir($build_dir) or $OK=0;
PrintErrorMessage("Changing to $build_dir failed!") if (!$OK);
- return 0 if (!$OK);
+ return 0 if (!$OK);
# insert $MacroBlock into AUTO_MACRO_MASTER in scummvm_base.mmp
PrintMessage("Setting new AUTO_MACROS_MASTER in scummvm_base.mmp for '$Variation'") if (!$ReallyQuiet);
my $n = "AUTO_MACROS_MASTER";
my $a = "\/\/START_$n\/\/";
my $b = "\/\/STOP_$n\/\/";
- my $name = "scummvm_base.mmp";
+ my $name = "scummvm_base.mmp";
my $file = "$build_dir/mmp/$name";
my $updated = " Updated @ ".localtime();
@@ -401,11 +401,11 @@ sub PrepVariation()
return 0 if (!$OK);
my @lines = <FILE>;
close FILE;
-
+
my $onestr = join("",@lines);
$MacroBlock =~ s/^\s*//gm;
$onestr =~ s/$a(.*)$b/$a$updated\n$ExtraMacros$MacroBlock$b/s;
-
+
open FILE, ">$file" or $OK=0;
PrintErrorMessage("Writing file '$file'") if (!$OK);
return 0 if (!$OK);
@@ -418,7 +418,7 @@ sub PrepVariation()
$OK = 0 if ($? >> 8);
PrintErrorMessage("'AdaptAllMMPs.pl' exited with value " . ($? >> 8)) if ($? >> 8);
return 0 if (!$OK);
-
+
# we are here: so all is ok :)
return 1;
}
@@ -431,7 +431,7 @@ sub BuildVariation()
my $TargetName = $SDK_TargetName{$SDK};
my $TargetDir = $SDK_TargetDir{$SDK};
my $OK = 1;
-
+
my $dir = $build_dir."/".$SDK_BuildDirs{$SDK};
$dir =~ s#/#\\#g;
chdir($dir);
@@ -454,8 +454,8 @@ sub BuildVariation()
PrintErrorMessage("'bldmake bldfiles' exited with value " . ($? >> 8)) if ($? >> 8);
system("abld clean $TargetName urel 2> NUL > NUL");
- PrintErrorMessage("'abld clean $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
-
+ PrintErrorMessage("'abld clean $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
+
my $Redirection = "OUT:file, ERR:".($RedirectSTDERR ? "file" : "screen");
my $Message = "Building $Package ($Redirection)";
PrintMessage($Message) if (!$ReallyQuiet);
@@ -467,7 +467,7 @@ sub BuildVariation()
$OK = 0 if ($? >> 8);
print " STDERR: ".((-s $build_log_err)-$OldSize)." bytes output written to $build_log_err\n+--------------------------------------------------------------------------------------\n" if ($OldSize != (-s $build_log_err) && !$ReallyQuiet);
PrintErrorMessage("'abld build $TargetName urel' exited with value " . ($? >> 8)) if ($? >> 8);
- return 0 if (!$OK); # ABLD always returns ok :( grr
+ return 0 if (!$OK); # ABLD always returns ok :( grr
PrintMessage("Done.") if (!$ReallyQuiet);
# do we have an override suffix for the package name?
@@ -491,7 +491,7 @@ sub BuildVariation()
if (-e "$output_dir/$Package")
{
$PackagesCreated++;
-
+
if ($TargetIntermediatePath ne '' && $TargetIntermediatePath =~ /\\EPOC32\\BUILD\\/i) # make really sure it's a valid path!
{
#PrintMessage("Cleaning $TargetIntermediatePath");
@@ -514,7 +514,7 @@ sub UploadVariation()
use Net::FTP;
my $newerr;
-
+
PrintMessage("Connecting to FTP $FTP_Host") if (!$ReallyQuiet);
$ftp = Net::FTP->new($FTP_Host,Timeout=>240) or $newerr=1;
@@ -529,7 +529,7 @@ sub UploadVariation()
{
PrintMessage("Changing to dir $FTP_Dir");
$ftp->cwd($FTP_Dir) or $newerr=1;
-
+
if ($newerr)
{
PrintErrorMessage("Changing to dir $FTP_Dir! Aborting!");
@@ -541,20 +541,20 @@ sub UploadVariation()
# leave this for possible auto-deletion of old files?
# @files = $ftp->dir or $newerr=1;
# push @ERRORS, "Can't get file list $!\n" if $newerr;
-# print "Got file list\n";
+# print "Got file list\n";
# foreach(@files) {
# print "$_\n";
# }
-
+
PrintMessage("Uploading $Package (".(-s "$output_dir/$Package")." bytes)");
-
+
$ftp->binary;
$ftp->put("$output_dir/$Package") or $newerr=1;
PrintErrorMessage("Uploading package! Aborting!") if $newerr;
$PackagesUploaded++ if (!$newerr);
- }
+ }
- $ftp->quit;
+ $ftp->quit;
}
}
@@ -594,7 +594,7 @@ sub CleanupPath()
{
$path =~ s/\"\Q$ECompXL_BinDir\E\";//g;
}
-
+
while( ($SDK, $RootDir) = each(%SDK_RootDirs) )
{
if ($SDK_RootDirs{$SDK} ne '')
@@ -602,8 +602,8 @@ sub CleanupPath()
my $path_component = "\"".$SDK_RootDirs{$SDK}."\\epoc32\\";
$path =~ s/\Q$path_component\E.*?\";//g;
}
- }
-
+ }
+
return $path;
}
@@ -634,4 +634,4 @@ sub PrintMessage()
}
##################################################################################################################
- \ No newline at end of file
+
diff --git a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
index 0d8efd5913..0275c2acd7 100644
--- a/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
+++ b/backends/platform/symbian/BuildPackageUpload_LocalSettings.pl
@@ -1,13 +1,13 @@
##################################################################################################################
- # you can use these below for speed & clarity or override with custom settings
+ # you can use these below for speed & clarity or override with custom settings
$DefaultTopMacros = "
MACRO USE_ZLIB // LIB:zlib.lib
MACRO USE_MAD // LIB:libmad.lib
MACRO USE_TREMOR // LIB:libtremor.lib
";
-
+
$DefaultBottomMacros = "
MACRO DISABLE_SWORD1 // LIB:scummvm_sword1.lib
MACRO DISABLE_SWORD2 // LIB:scummvm_sword2.lib
@@ -31,7 +31,7 @@
$HaltOnError = 1;
$SkipExistingPackages = 0;
$ReallyQuiet = 0;
-
+
# specify an optional FTP server to upload to after each Build+Package (can leave empty)
#$FTP_Host = "host.domain";
#$FTP_User = "test";
@@ -42,7 +42,7 @@
$FTP_User = "something";
$FTP_Pass = "password";
$FTP_Dir = "cvsbuilds";
-
+
# possible SDKs: ("UIQ2", UIQ3", "S60v1", "S60v2", "S60v3", "S80", "S90")
# Note1: the \epoc32 directory needs to be in these rootdirs
# Note2: these paths do NOT end in a backslash!
@@ -67,12 +67,12 @@
#$SDK_LibraryDirs{'S90'}{'esdl.lib'} = "C:\\S\\ESDL\\epoc\\S90";
#$SDK_LibraryDirs{'ALL'}{'libmpeg2.lib'} = "C:\\S\\mpeg2dec-0.4.0\\epoc";
}
-
+
# backup :P
#Path=C:\Progra~1\Active\Python24\.;C:\Program Files\Active\Tcl\bin;C:\Progra~1\Active\Perl\bin\;C:\WINDOWS\system32;C:\W
#INDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\ATI Technologies\ATI Control Panel;C:\Program Files\GNU\cvsnt;C:\Progra
#m Files\WinSCP3\;"C:\Program Files\Common Files\Microsoft Shared\VSA\8.0\VsaEnv\";"c:\Program Files\Microsoft Visual Stu
- #dio 8\VC\bin";"C:\Program Files\UltraEdit-32"
+ #dio 8\VC\bin";"C:\Program Files\UltraEdit-32"
}
elsif ($ENV{'COMPUTERNAME'} eq "TSSLND0106")
{
@@ -81,12 +81,12 @@
$HaltOnError = 0;
$SkipExistingPackages = 0;
$ReallyQuiet = 0;
-
+
#$FTP_Host = "host.com";
#$FTP_User = "ag@host.com";
#$FTP_Pass = "password";
#$FTP_Dir = "cvsbuilds";
-
+
#$SDK_RootDirs{'UIQ2'}= "C:\\UIQ2";
$SDK_RootDirs{'UIQ3'}= "C:\\UIQ3";
#$SDK_RootDirs{'S60v1'}= "C:\\S60v1";
@@ -115,12 +115,12 @@ elsif ($ENV{'COMPUTERNAME'} eq "BIGMACHINE")
$HaltOnError = 0;
$SkipExistingPackages = 1;
$ReallyQuiet = 1;
-
+
#$FTP_Host = "host.com";
#$FTP_User = "ag@host.com";
#$FTP_Pass = "password";
#$FTP_Dir = "cvsbuilds";
-
+
#$SDK_RootDirs{'UIQ2'}= "E:\\UIQ2";
$SDK_RootDirs{'UIQ3'}= "E:\\UIQ3";
#$SDK_RootDirs{'S60v1'}= "E:\\S60v1";
@@ -146,7 +146,7 @@ if (0) # so we can turn them on/off easily
}
else
{
- print "ERROR: Computer name ".$ENV{'COMPUTERNAME'}." not recognized! Plz edit _LocalSettings.pl!";
+ print "ERROR: Computer name ".$ENV{'COMPUTERNAME'}." not recognized! Plz edit _LocalSettings.pl!";
exit 1;
}
@@ -156,7 +156,7 @@ if (0) # so we can turn them on/off easily
# second hash index = literal string used in .sis file created.
# empty string also removes the trailing '_'. Some 051101 examples:
-
+
# $SDK_Variations{'UIQ2'}{''} would produce:
# scummvm-051101-SymbianUIQ2.sis
@@ -187,7 +187,7 @@ if (0) # so we can turn them on/off easily
if (1) # all regular combo's
{
# the first one includes all SDKs & release-ready engines
-
+
$SDK_Variations{'ALL'}{'all'} = "$DefaultTopMacros
//MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
//MACRO DISABLE_AGOS // LIB:scummvm_agos.lib
@@ -206,7 +206,7 @@ if (1) # all regular combo's
$DefaultBottomMacros";
# now one for each ready-for-release engine
-
+
$SDK_Variations{'ALL'}{'scumm'} = "$DefaultTopMacros
//MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
MACRO DISABLE_AGOS // LIB:scummvm_agos.lib
@@ -217,7 +217,7 @@ if (1) # all regular combo's
MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
MACRO DISABLE_LURE // LIB:scummvm_lure.lib
MACRO DISABLE_CINE // LIB:scummvm_cine.lib
- MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+ MACRO DISABLE_AGI // LIB:scummvm_agi.lib
MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
MACRO DISABLE_IGOR // LIB:scummvm_igor.lib
$DefaultBottomMacros";
@@ -247,7 +247,7 @@ if (1) # all regular combo's
MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
MACRO DISABLE_LURE // LIB:scummvm_lure.lib
MACRO DISABLE_CINE // LIB:scummvm_cine.lib
- MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+ MACRO DISABLE_AGI // LIB:scummvm_agi.lib
MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
MACRO DISABLE_IGOR // LIB:scummvm_igor.lib
$DefaultBottomMacros";
@@ -305,9 +305,9 @@ if (1) # all regular combo's
MACRO DISABLE_GOB // LIB:scummvm_gob.lib
MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
//MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
- MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+ MACRO DISABLE_AGI // LIB:scummvm_agi.lib
MACRO DISABLE_LURE // LIB:scummvm_lure.lib
- MACRO DISABLE_CINE // LIB:scummvm_cine.lib
+ MACRO DISABLE_CINE // LIB:scummvm_cine.lib
MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
MACRO DISABLE_IGOR // LIB:scummvm_igor.lib
$DefaultBottomMacros";
@@ -317,7 +317,7 @@ if (1) # all regular combo's
$SDK_Variations{'ALL'}{'saga_mini'} = "
//MACRO USE_ZLIB // LIB:zlib.lib
//MACRO USE_MAD // LIB:libmad.lib
- //MACRO USE_TREMOR // LIB:libtremor.lib
+ //MACRO USE_TREMOR // LIB:libtremor.lib
MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
MACRO DISABLE_AGOS // LIB:scummvm_agos.lib
MACRO DISABLE_SKY // LIB:scummvm_sky.lib
@@ -325,9 +325,9 @@ if (1) # all regular combo's
MACRO DISABLE_GOB // LIB:scummvm_gob.lib
//MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
- MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+ MACRO DISABLE_AGI // LIB:scummvm_agi.lib
MACRO DISABLE_LURE // LIB:scummvm_lure.lib
- MACRO DISABLE_CINE // LIB:scummvm_cine.lib
+ MACRO DISABLE_CINE // LIB:scummvm_cine.lib
MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
MACRO DISABLE_IGOR // LIB:scummvm_igor.lib
$DefaultBottomMacros";
@@ -337,7 +337,7 @@ if (1) # all regular combo's
# MACRO USE_MAD // LIB:libmad.lib
# //MACRO USE_TREMOR // LIB:libtremor.lib
# MACRO DISABLE_SCUMM_7_8
-# MACRO DISABLE_SCUMM_HE
+# MACRO DISABLE_SCUMM_HE
# //MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
# MACRO DISABLE_AGOS // LIB:scummvm_agos.lib
# MACRO DISABLE_SKY // LIB:scummvm_sky.lib
@@ -345,17 +345,17 @@ if (1) # all regular combo's
# MACRO DISABLE_GOB // LIB:scummvm_gob.lib
# MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
# MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
-# MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+# MACRO DISABLE_AGI // LIB:scummvm_agi.lib
# MACRO DISABLE_LURE // LIB:scummvm_lure.lib
-# MACRO DISABLE_CINE // LIB:scummvm_cine.lib
+# MACRO DISABLE_CINE // LIB:scummvm_cine.lib
# MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
# $DefaultBottomMacros";
-
+
# $SDK_Variations{'ALL'}{'all_vorbis'} = "
# MACRO USE_ZLIB // LIB:zlib.lib
# MACRO USE_MAD // LIB:libmad.lib
# MACRO USE_TREMOR // LIB:libtremor.lib
-#
+#
# //MACRO DISABLE_SCUMM // LIB:scummvm_scumm.lib
# //MACRO DISABLE_AGOS // LIB:scummvm_agos.lib
# //MACRO DISABLE_SKY // LIB:scummvm_sky.lib
@@ -372,10 +372,10 @@ if (1) # all regular combo's
MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
MACRO DISABLE_GOB // LIB:scummvm_gob.lib
MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
- MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
//MACRO DISABLE_LURE // LIB:scummvm_lure.lib
MACRO DISABLE_CINE // LIB:scummvm_agi.lib
- MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+ MACRO DISABLE_AGI // LIB:scummvm_agi.lib
MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
MACRO DISABLE_IGOR // LIB:scummvm_igor.lib
$DefaultBottomMacros";
@@ -388,10 +388,10 @@ if (1) # all regular combo's
MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
MACRO DISABLE_GOB // LIB:scummvm_gob.lib
MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
- MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
MACRO DISABLE_LURE // LIB:scummvm_lure.lib
//MACRO DISABLE_CINE // LIB:scummvm_cine.lib
- MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+ MACRO DISABLE_AGI // LIB:scummvm_agi.lib
MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
MACRO DISABLE_IGOR // LIB:scummvm_igor.lib
$DefaultBottomMacros";
@@ -403,7 +403,7 @@ if (1) # all regular combo's
MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
MACRO DISABLE_GOB // LIB:scummvm_gob.lib
MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
- MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
MACRO DISABLE_LURE // LIB:scummvm_lure.lib
MACRO DISABLE_CINE // LIB:scummvm_cine.lib
//MACRO DISABLE_AGI // LIB:scummvm_agi.lib
@@ -419,16 +419,16 @@ if (1) # all regular combo's
MACRO DISABLE_QUEEN // LIB:scummvm_queen.lib
MACRO DISABLE_GOB // LIB:scummvm_gob.lib
MACRO DISABLE_SAGA // LIB:scummvm_saga.lib
- MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
+ MACRO DISABLE_KYRA // LIB:scummvm_kyra.lib
MACRO DISABLE_LURE // LIB:scummvm_lure.lib
MACRO DISABLE_CINE // LIB:scummvm_cine.lib
- MACRO DISABLE_AGI // LIB:scummvm_agi.lib
+ MACRO DISABLE_AGI // LIB:scummvm_agi.lib
MACRO DISABLE_CRUISE // LIB:scummvm_cruise.lib
//MACRO DISABLE_TOUCHE // LIB:scummvm_touche.lib
MACRO DISABLE_SWORD1 // LIB:scummvm_sword1.lib
MACRO DISABLE_SWORD2 // LIB:scummvm_sword2.lib
- MACRO DISABLE_PARALLACTION // LIB:scummvm_parallaction.lib
- MACRO DISABLE_DRASCULA // LIB:scummvm_drascula.lib
+ MACRO DISABLE_PARALLACTION // LIB:scummvm_parallaction.lib
+ MACRO DISABLE_DRASCULA // LIB:scummvm_drascula.lib
MACRO DISABLE_IGOR // LIB:scummvm_igor.lib
";
}
diff --git a/backends/platform/symbian/README b/backends/platform/symbian/README
index 1ed9c6faf6..0f9df338c3 100644
--- a/backends/platform/symbian/README
+++ b/backends/platform/symbian/README
@@ -1,20 +1,20 @@
ScummVM - ScummVM ported to EPOC/SymbianOS
-
+
Copyright (C) 2003-2005 Andreas 'Sprawl' Karlsson
Copyright (C) 2007 Lars 'AnotherGuest' Persson
Copyright (C) 2007 Jurgen 'SumthinWicked' Braam
Copyright (C) 2007 ScummVM Team
-
- $Id$
-
-
+
+ $Id$
+
+
About ScummVM
--------------
The original ports (uptil 0.7.1) were made by Andreas Karlsson and Lars Persson.
The main transition to 0.8.0CVS and all relevant changes were done by Jurgen Braam.
Jurgen and Lars have successfully transfered all needed changes into CVS, with additional helpful tools for Symbian OS
-
+
Release version: 0.10.0
* This version is only supported on Symbian OS 9 devices due to compiler constraints for older devices. (That means UIQ3 and S60V3 devices)
* Updated to SDL version 1.2.11 (previous version used was 1.2.8)
@@ -30,13 +30,13 @@ Games supported
Building ScummVM
----------------------
+---------------------
Nescessary components
---------------------
Building ScummVM yourself using the UIQ 2.1/Nokia S60 SDK/Nokia S80 SDK/Nokia S90 SDK framework is not an easy task!
- Lets just say the framework needs quite some time to set up and takes a while
- to get used to. If you choose to continue you will need the following items:
+ Lets just say the framework needs quite some time to set up and takes a while
+ to get used to. If you choose to continue you will need the following items:
- UIQ 2.1 SDK (To build for UIQ2 devices);
http://www.symbian.com/developer/sdks_uiq.asp
@@ -49,13 +49,13 @@ Building ScummVM
- ECompXL, an EPOC application compression library
http://www.yipton.demon.co.uk/ecompxl/latest/readme.html (To build for UIQ devices)
-
- - libsdl, Simple Directmedia Layer, a cross-platform multimedia library
+
+ - libsdl, Simple Directmedia Layer, a cross-platform multimedia library
http://www.libsdl.org/ (see note about ESDL below)
- libmad, a high-quality MPEG audio decoder
- http://www.underbit.com/products/mad/
-
+ http://www.underbit.com/products/mad/
+
- zlib, a massively spiffy yet delicately unobtrusive compression library
http://www.zlib.net/
@@ -63,60 +63,60 @@ Building ScummVM
- libogg, the free media file container format
http://www.xiph.org/ogg/
-
+
- libvorbis, the free audio codec
http://www.vorbis.com/
-
+
- flac, the Free Lossless Audio Codec
http://flac.sourceforge.net/
-
+
- libmpeg2, a free MPEG-2 video stream decoder
http://libmpeg2.sourceforge.net/
Compiling ScummVM
-----------------
-
- ECompXL (Only needed for UIQ2):
+
+ ECompXL (Only needed for UIQ2):
this is a tool that will compress your executable with GZIP and glue
it to a predefined loader app. The app will uncompress your application at
runtime and run it without you even knowing it. A really interesting byproduct
- of this method is that the general restriction of not having any writeable
+ of this method is that the general restriction of not having any writeable
static data (WSD) for Symbian APP executables no longer applies. This makes
the life of an EPOC porter a lot easier! To install this tool you need to add
its \bin path to your PATH above the sybmian epocs32\tools path, so that ECompXL's
- PETRAN.EXE will be the executable that is started.
+ PETRAN.EXE will be the executable that is started.
-
- SDL: the latest version of SDL at this point in time is 1.2.12. This version
+
+ SDL: the latest version of SDL at this point in time is 1.2.12. This version
works great for compiling on other platforms.
-
- zlib: the zlib-x.x.x.tar.gz does not come with UIQ .mpp build files, that's why
- I added them for you in epoc-zlib.zip. Extract in <DevRoot>/zlib/ which will
+
+ zlib: the zlib-x.x.x.tar.gz does not come with UIQ .mpp build files, that's why
+ I added them for you in epoc-zlib.zip. Extract in <DevRoot>/zlib/ which will
create the epoc dir. In <DevRoot>/zlib/epoc/ go:
> bldmake bldfiles
> abld build
libmad: the libmad-x.x.x.tar.gz does not come with UIQ .mpp build files, that's
- why I added them for you in epoc-libmad.zip. Extract in <DevRoot>/libmad/ which
+ why I added them for you in epoc-libmad.zip. Extract in <DevRoot>/libmad/ which
will create the epoc dir. In <DevRoot>/libmad/epoc/ go:
> bldmake bldfiles
> abld build
- ScummVM:
+ ScummVM:
In <DevRoot>\scummvm\backends\platform\symbian\ go:
- a) Edit and update the BuildPackageUpload_LocalSettings.pl for the kind of build (SDK installed etc) and variants
+ a) Edit and update the BuildPackageUpload_LocalSettings.pl for the kind of build (SDK installed etc) and variants
you want to build.
- b) Run BuildPackageUpload_AllVersions.pl to build all the targets/variants that you have configured.
+ b) Run BuildPackageUpload_AllVersions.pl to build all the targets/variants that you have configured.
A detailed log will be placed in the symbian folder with Build.err.log and Build.out.log but it also depends on
the configuration you select.
-
- Now you should have yourself a nice ScummVM_xxx.sis installer package in the packages folder for use
+
+ Now you should have yourself a nice ScummVM_xxx.sis installer package in the packages folder for use
on your phone. Please note that for development it will be a lot faster if you
transfer the SCUMMVM.APP/Scummvm.EXE file directly to your !:\system\apps\ScummVM\ dir!
Platforms can be one of: ARMi, ARM4, THUMB, WINS, WINSCW, GCCE. The SE P900 uses the ARMi platform,
- which is a combined ARM4/THUMB programming mode. Configurations can be one of:
+ which is a combined ARM4/THUMB programming mode. Configurations can be one of:
UREL or UDEB.
@@ -130,11 +130,11 @@ Greetz & such
- the entire ScummVM Dev team for making a kicka$$ program
- the folks in #scummvm @ irc.freenode.net for their help, confort and support
- everybody else who wants to give me 'the look' for not including them here :P
-
+
it's been swell,
gotta go now,
-
+
greetz,
SumthinWicked & Anotherguest
-
+
diff --git a/backends/platform/symbian/S60/ScummVM_S60.mmp.in b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
index 83aba4e2f2..2720264971 100644
--- a/backends/platform/symbian/S60/ScummVM_S60.mmp.in
+++ b/backends/platform/symbian/S60/ScummVM_S60.mmp.in
@@ -65,7 +65,7 @@ USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
@@ -86,8 +86,8 @@ SOURCE backends\platform\sdl\events.cpp
SOURCE backends\platform\sdl\graphics.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\fs\symbian\symbian-fs.cpp
-SOURCE backends\platform\symbian\src\SymbianOS.cpp
-SOURCE backends\platform\symbian\src\SymbianActions.cpp
+SOURCE backends\platform\symbian\src\SymbianOS.cpp
+SOURCE backends\platform\symbian\src\SymbianActions.cpp
SOURCE backends\platform\symbian\src\ScummApp.cpp
SOURCE gui\Key.cpp
@@ -99,8 +99,8 @@ source graphics\iff.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
+LIBRARY cone.lib eikcore.lib
+LIBRARY euser.lib apparc.lib fbscli.lib
LIBRARY estlib.lib apgrfx.lib
LIBRARY gdi.lib hal.lib bitgdi.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
diff --git a/backends/platform/symbian/S60/ScummVM_S60_App.mmp b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
index 6caf91009b..0f58881584 100644
--- a/backends/platform/symbian/S60/ScummVM_S60_App.mmp
+++ b/backends/platform/symbian/S60/ScummVM_S60_App.mmp
@@ -43,7 +43,7 @@ sourcepath ..
AIF ScummVm.Aif ..\res\ ScummVmAif.rss c16 ScummL.bmp ScummLM.bmp ScummS.bmp ScummSM.bmp
// libraries
-LIBRARY cone.lib EIKCORE.lib
-LIBRARY euser.lib apparc.lib
+LIBRARY cone.lib EIKCORE.lib
+LIBRARY euser.lib apparc.lib
LIBRARY efsrv.lib apgrfx.lib
LIBRARY avkon.lib
diff --git a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg
index 9bb133c67f..bf3c69ae08 100644
--- a/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg
+++ b/backends/platform/symbian/S60/scummvm-CVS-SymbianS60v1.pkg
@@ -15,8 +15,8 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
;
-; $URL:
-; $Id:
+; $URL:$
+; $Id:$
;
;
@@ -60,4 +60,4 @@
""-"!:\system\apps\ScummVM\sdl.ini",FILENULL
; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini.
-; It will remove the config file, std***.txt files & dirs on uninstall. \ No newline at end of file
+; It will remove the config file, std***.txt files & dirs on uninstall.
diff --git a/backends/platform/symbian/S60v3/ScummVM_Loc.rss b/backends/platform/symbian/S60v3/ScummVM_Loc.rss
index 83a8cfcc4c..d6800b3b20 100644
--- a/backends/platform/symbian/S60v3/ScummVM_Loc.rss
+++ b/backends/platform/symbian/S60v3/ScummVM_Loc.rss
@@ -9,9 +9,9 @@ RESOURCE LOCALISABLE_APP_INFO
{
// The caption text is defined in the rls file
caption = "ScummVM";
- // Icons are used to represent applications in the
+ // Icons are used to represent applications in the
// application launcher and application title bar.
- // The number_of_icons value identifies how many icons
+ // The number_of_icons value identifies how many icons
// that exist in the icon_file.
number_of_icons = 3;
// Using the application icons.
diff --git a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
index ba5242bdfc..ae43031356 100644
--- a/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
+++ b/backends/platform/symbian/S60v3/ScummVM_S60v3.mmp.in
@@ -30,7 +30,7 @@ TARGET ScummVM.exe
TARGETPATH sys\bin
TARGETTYPE exe
-UID 0x100039ce 0xA0000657
+UID 0x100039ce 0xA0000657
START RESOURCE ScummVM_reg.rss
TARGETPATH \private\10003a3f\apps
@@ -48,7 +48,7 @@ TARGETPATH \Resource\Apps
LANG SC
END
-EPOCSTACKSIZE 80000
+EPOCSTACKSIZE 80000
EPOCHEAPSIZE 3000000 32000000
START BITMAP ScummVM.mbm
@@ -91,7 +91,7 @@ USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
@@ -112,8 +112,8 @@ SOURCE backends\platform\sdl\events.cpp
SOURCE backends\platform\sdl\graphics.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\fs\abstract-fs-factory.cpp
-SOURCE backends\platform\symbian\src\SymbianOS.cpp
-SOURCE backends\platform\symbian\src\SymbianActions.cpp
+SOURCE backends\platform\symbian\src\SymbianOS.cpp
+SOURCE backends\platform\symbian\src\SymbianActions.cpp
SOURCE backends\platform\symbian\src\ScummApp.cpp
SOURCE gui\Key.cpp
@@ -124,8 +124,8 @@ SOURCE gui\Actions.cpp
source graphics\iff.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
+LIBRARY cone.lib eikcore.lib
+LIBRARY euser.lib apparc.lib fbscli.lib
LIBRARY estlib.lib apgrfx.lib
LIBRARY gdi.lib hal.lib bitgdi.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
diff --git a/backends/platform/symbian/S60v3/icons.mk b/backends/platform/symbian/S60v3/icons.mk
index 5f17dd7b8b..fdd09bffc4 100644
--- a/backends/platform/symbian/S60v3/icons.mk
+++ b/backends/platform/symbian/S60v3/icons.mk
@@ -20,7 +20,7 @@ LIB : do_nothing
CLEANLIB : do_nothing
-RESOURCE :
+RESOURCE :
mifconv $(ICONTARGETFILENAME) \
/c32 ..\res\scummvm.svg
@@ -31,4 +31,4 @@ SAVESPACE : do_nothing
RELEASABLES :
@echo $(ICONTARGETFILENAME)
-FINAL : do_nothing \ No newline at end of file
+FINAL : do_nothing
diff --git a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
index 89cff15a38..a7126db4c8 100644
--- a/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
+++ b/backends/platform/symbian/S60v3/scummvm-CVS-SymbianS60v3.pkg
@@ -15,8 +15,8 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
;
-; $URL:
-; $Id:
+; $URL:$
+; $Id:$
;
;
@@ -71,4 +71,4 @@
""-"c:\data\scummvm\sdl.ini",FILENULL
; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini.
-; It will remove the config file, std***.txt files & dirs on uninstall. \ No newline at end of file
+; It will remove the config file, std***.txt files & dirs on uninstall.
diff --git a/backends/platform/symbian/S60v3/scummvm_reg.rss b/backends/platform/symbian/S60v3/scummvm_reg.rss
index df99094b2e..1156694bd7 100644
--- a/backends/platform/symbian/S60v3/scummvm_reg.rss
+++ b/backends/platform/symbian/S60v3/scummvm_reg.rss
@@ -1,14 +1,14 @@
-// All registration files need to #include appinfo.rh.
+// All registration files need to #include appinfo.rh.
#include <AppInfo.rh>
-// All registration files must define UID2, which is always
+// All registration files must define UID2, which is always
// KUidAppRegistrationResourceFile, and UID3, which is the application's UID.
UID2 KUidAppRegistrationResourceFile
UID3 0xA0000657 // application UID
// Registration file need to containo an APP_REGISTRATION_INFO resource that
-// minimally needs to provide the name of the application binary (using the
-// app_file statement).
+// minimally needs to provide the name of the application binary (using the
+// app_file statement).
RESOURCE APP_REGISTRATION_INFO
{
app_file = "ScummVM"; // filename of application binary (minus extension)
diff --git a/backends/platform/symbian/S80/ScummVM_S80.mmp.in b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
index 4bcb64060b..326e895941 100644
--- a/backends/platform/symbian/S80/ScummVM_S80.mmp.in
+++ b/backends/platform/symbian/S80/ScummVM_S80.mmp.in
@@ -63,7 +63,7 @@ USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
@@ -84,8 +84,8 @@ SOURCE backends\platform\sdl\events.cpp
SOURCE backends\platform\sdl\graphics.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\fs\symbian\symbian-fs.cpp
-SOURCE backends\platform\symbian\src\SymbianOS.cpp
-SOURCE backends\platform\symbian\src\SymbianActions.cpp
+SOURCE backends\platform\symbian\src\SymbianOS.cpp
+SOURCE backends\platform\symbian\src\SymbianActions.cpp
SOURCE backends\platform\symbian\src\ScummApp.cpp
SOURCE gui\Key.cpp
@@ -97,8 +97,8 @@ source graphics\iff.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
+LIBRARY cone.lib eikcore.lib
+LIBRARY euser.lib apparc.lib fbscli.lib
LIBRARY estlib.lib apgrfx.lib
LIBRARY gdi.lib hal.lib bitgdi.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib bafl.lib
diff --git a/backends/platform/symbian/S80/ScummVM_S80_App.mmp b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
index 09fa822bc7..2754eb49c6 100644
--- a/backends/platform/symbian/S80/ScummVM_S80_App.mmp
+++ b/backends/platform/symbian/S80/ScummVM_S80_App.mmp
@@ -44,6 +44,6 @@ sourcepath ..
AIF ScummVm.Aif ..\res\ ScummVmAif.rss c16 ScummL.bmp ScummLM.bmp ScummS.bmp ScummSM.bmp
// libraries
-LIBRARY cone.lib EIKCORE.lib
-LIBRARY euser.lib apparc.lib
+LIBRARY cone.lib EIKCORE.lib
+LIBRARY euser.lib apparc.lib
LIBRARY efsrv.lib apgrfx.lib
diff --git a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
index 675ce525cd..30c92304b8 100644
--- a/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
+++ b/backends/platform/symbian/S80/scummvm-CVS-SymbianS80.pkg
@@ -15,8 +15,8 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
;
-; $URL:
-; $Id:
+; $URL:$
+; $Id:$
;
;
@@ -59,4 +59,4 @@
""-"!:\system\apps\ScummVM\sdl.ini",FILENULL
; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini.
-; It will remove the config file, std***.txt files & dirs on uninstall. \ No newline at end of file
+; It will remove the config file, std***.txt files & dirs on uninstall.
diff --git a/backends/platform/symbian/S90/Scummvm_S90.mmp.in b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
index e55acc63b1..df8872515f 100644
--- a/backends/platform/symbian/S90/Scummvm_S90.mmp.in
+++ b/backends/platform/symbian/S90/Scummvm_S90.mmp.in
@@ -42,7 +42,7 @@ EPOCHEAPSIZE 1024 161920000
MACRO S90
-//START_AUTO_MACROS_SLAVE//
+//START_AUTO_MACROS_SLAVE//
// empty base file, will be updated by Perl build scripts
@@ -63,7 +63,7 @@ USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
@@ -84,8 +84,8 @@ SOURCE backends\platform\sdl\events.cpp
SOURCE backends\platform\sdl\graphics.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\fs\symbian\symbian-fs.cpp
-SOURCE backends\platform\symbian\src\SymbianOS.cpp
-SOURCE backends\platform\symbian\src\SymbianActions.cpp
+SOURCE backends\platform\symbian\src\SymbianOS.cpp
+SOURCE backends\platform\symbian\src\SymbianActions.cpp
SOURCE backends\platform\symbian\src\ScummApp.cpp
SOURCE gui\Key.cpp
@@ -97,8 +97,8 @@ source graphics\iff.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
+LIBRARY cone.lib eikcore.lib
+LIBRARY euser.lib apparc.lib fbscli.lib
LIBRARY estlib.lib apgrfx.lib
LIBRARY gdi.lib hal.lib bitgdi.lib bafl.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
diff --git a/backends/platform/symbian/S90/Scummvm_S90_App.mmp b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
index 62a045e146..eea89fca4b 100644
--- a/backends/platform/symbian/S90/Scummvm_S90_App.mmp
+++ b/backends/platform/symbian/S90/Scummvm_S90_App.mmp
@@ -44,6 +44,6 @@ sourcepath ..
AIF ScummVm.Aif ..\res\ ScummVmAif.rss c16 ScummL.bmp ScummLM.bmp ScummS.bmp ScummSM.bmp
// libraries
-LIBRARY cone.lib EIKCORE.lib
-LIBRARY euser.lib apparc.lib
-LIBRARY efsrv.lib apgrfx.lib \ No newline at end of file
+LIBRARY cone.lib EIKCORE.lib
+LIBRARY euser.lib apparc.lib
+LIBRARY efsrv.lib apgrfx.lib
diff --git a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
index ac6c18c9dc..5366207a62 100644
--- a/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
+++ b/backends/platform/symbian/S90/scummvm-CVS-SymbianS90.pkg
@@ -15,8 +15,8 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
;
-; $URL:
-; $Id:
+; $URL:$
+; $Id:$
;
;
@@ -59,4 +59,4 @@
""-"!:\system\apps\ScummVM\sdl.ini",FILENULL
; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini.
-; It will remove the config file, std***.txt files & dirs on uninstall. \ No newline at end of file
+; It will remove the config file, std***.txt files & dirs on uninstall.
diff --git a/backends/platform/symbian/UIQ2/ScummVM.rss b/backends/platform/symbian/UIQ2/ScummVM.rss
index a55fabfc51..2c1d3d6971 100644
--- a/backends/platform/symbian/UIQ2/ScummVM.rss
+++ b/backends/platform/symbian/UIQ2/ScummVM.rss
@@ -27,10 +27,10 @@
NAME SCUM
// Include definitions of resource STRUCTS used by this
-// resource script
+// resource script
#include <eikon.rh>
#include "..\src\Scummvm.hrh"
-// Include the standard Eikon resource ids
+// Include the standard Eikon resource ids
#include <eikon.rsg>
diff --git a/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in b/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in
index 3e9c408c96..cfd6c27fd6 100644
--- a/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in
+++ b/backends/platform/symbian/UIQ2/ScummVM_UIQ2.mmp.in
@@ -29,7 +29,7 @@
TARGET SCUMMVM.APP
TARGETPATH system\apps\ScummVM
TARGETTYPE app
-
+
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
@@ -61,7 +61,7 @@ USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
@@ -82,8 +82,8 @@ SOURCE backends\platform\sdl\events.cpp
SOURCE backends\platform\sdl\graphics.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\fs\symbian\symbian-fs.cpp
-SOURCE backends\platform\symbian\src\SymbianOS.cpp
-SOURCE backends\platform\symbian\src\SymbianActions.cpp
+SOURCE backends\platform\symbian\src\SymbianOS.cpp
+SOURCE backends\platform\symbian\src\SymbianActions.cpp
SOURCE backends\platform\symbian\src\ScummApp.cpp
SOURCE gui\Key.cpp
@@ -95,8 +95,8 @@ source graphics\iff.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
+LIBRARY cone.lib eikcore.lib
+LIBRARY euser.lib apparc.lib fbscli.lib
LIBRARY estlib.lib apgrfx.lib
LIBRARY gdi.lib hal.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
diff --git a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg
index d55d70c823..aca927eadd 100644
--- a/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg
+++ b/backends/platform/symbian/UIQ2/scummvm-CVS-SymbianUIQ2.pkg
@@ -15,8 +15,8 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
;
-; $URL:
-; $Id:
+; $URL:$
+; $Id:$
;
;
@@ -58,4 +58,4 @@
""-"!:\system\apps\ScummVM\sdl.ini",FILENULL
; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini.
-; It will remove the config file, std***.txt files & dirs on uninstall. \ No newline at end of file
+; It will remove the config file, std***.txt files & dirs on uninstall.
diff --git a/backends/platform/symbian/UIQ3/ScummVM.rss b/backends/platform/symbian/UIQ3/ScummVM.rss
index 9430f4a2ba..71e9ac8881 100644
--- a/backends/platform/symbian/UIQ3/ScummVM.rss
+++ b/backends/platform/symbian/UIQ3/ScummVM.rss
@@ -27,11 +27,11 @@
NAME SCUM
// Include definitions of resource STRUCTS used by this
-// resource script
+// resource script
#include <eikon.rh>
#include <qikon.rh>
#include "..\src\Scummvm.hrh"
-// Include the standard Eikon resource ids
+// Include the standard Eikon resource ids
#include <eikon.rsg>
diff --git a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
index 3fcecdac75..0b43f7b4c6 100644
--- a/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
+++ b/backends/platform/symbian/UIQ3/ScummVM_UIQ3.mmp.in
@@ -29,8 +29,8 @@
TARGET ScummVM.exe
TARGETPATH sys\bin
TARGETTYPE exe
-
-UID 0x100039ce 0xA0000657
+
+UID 0x100039ce 0xA0000657
START RESOURCE ScummVM_reg.rss
TARGETPATH \private\10003a3f\apps
@@ -48,7 +48,7 @@ TARGETPATH \Resource\Apps
LANG SC
END
-EPOCSTACKSIZE 80000
+EPOCSTACKSIZE 80000
EPOCHEAPSIZE 3000000 32000000
START BITMAP ScummVM.mbm
@@ -91,7 +91,7 @@ USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl ..
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
@@ -112,8 +112,8 @@ SOURCE backends\platform\sdl\events.cpp
SOURCE backends\platform\sdl\graphics.cpp
SOURCE backends\platform\sdl\sdl.cpp
SOURCE backends\fs\abstract-fs-factory.cpp
-SOURCE backends\platform\symbian\src\SymbianOS.cpp
-SOURCE backends\platform\symbian\src\SymbianActions.cpp
+SOURCE backends\platform\symbian\src\SymbianOS.cpp
+SOURCE backends\platform\symbian\src\SymbianActions.cpp
SOURCE backends\platform\symbian\src\ScummApp.cpp
SOURCE gui\Key.cpp
@@ -124,10 +124,10 @@ SOURCE gui\Actions.cpp
source graphics\iff.cpp
// *** Dynamic Libraries
-LIBRARY cone.lib eikcore.lib
-LIBRARY euser.lib apparc.lib fbscli.lib
+LIBRARY cone.lib eikcore.lib
+LIBRARY euser.lib apparc.lib fbscli.lib
LIBRARY estlib.lib apgrfx.lib
LIBRARY gdi.lib hal.lib bitgdi.lib
LIBRARY mediaclientaudiostream.lib efsrv.lib ws32.lib
LIBRARY qikctl.lib
-library qikcore.lib bafl.lib eikcoctl.lib \ No newline at end of file
+library qikcore.lib bafl.lib eikcoctl.lib
diff --git a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
index 64300258d3..5d6ce01525 100644
--- a/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
+++ b/backends/platform/symbian/UIQ3/scummvm-CVS-SymbianUIQ3.pkg
@@ -15,8 +15,8 @@
; along with this program; if not, write to the Free Software
; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
;
-; $URL:
-; $Id:
+; $URL:$
+; $Id:$
;
;
@@ -69,4 +69,4 @@
""-"c:\shared\scummvm\sdl.ini",FILENULL
; This install layout will let you upgrade to newer versions wihout loss of scummvm.ini.
-; It will remove the config file, std***.txt files & dirs on uninstall. \ No newline at end of file
+; It will remove the config file, std***.txt files & dirs on uninstall.
diff --git a/backends/platform/symbian/UIQ3/scummvm_loc.rss b/backends/platform/symbian/UIQ3/scummvm_loc.rss
index bd3bc5129f..201aacefa3 100644
--- a/backends/platform/symbian/UIQ3/scummvm_loc.rss
+++ b/backends/platform/symbian/UIQ3/scummvm_loc.rss
@@ -10,9 +10,9 @@ RESOURCE LOCALISABLE_APP_INFO
{
// The caption text is defined in the rls file
caption = "ScummVM";
- // Icons are used to represent applications in the
+ // Icons are used to represent applications in the
// application launcher and application title bar.
- // The number_of_icons value identifies how many icons
+ // The number_of_icons value identifies how many icons
// that exist in the icon_file.
number_of_icons = 3;
// Using the application icons.
@@ -20,39 +20,39 @@ RESOURCE LOCALISABLE_APP_INFO
}
};
- view_list =
- {
- VIEW_DATA
- {
- uid = 0x10000001;
- screen_mode = 0;
- caption_and_icon = CAPTION_AND_ICON_INFO
- {
- };
- },
- VIEW_DATA
- {
+ view_list =
+ {
+ VIEW_DATA
+ {
+ uid = 0x10000001;
+ screen_mode = 0;
+ caption_and_icon = CAPTION_AND_ICON_INFO
+ {
+ };
+ },
+ VIEW_DATA
+ {
+ uid = 0x10000001;
+ screen_mode = EQikScreenModeLandscape;
+ caption_and_icon = CAPTION_AND_ICON_INFO
+ {
+ };
+ },
+ VIEW_DATA
+ {
uid = 0x10000001;
- screen_mode = EQikScreenModeLandscape;
- caption_and_icon = CAPTION_AND_ICON_INFO
- {
- };
- },
- VIEW_DATA
- {
- uid = 0x10000001;
- screen_mode = EQikScreenModeSmallPortrait;
- caption_and_icon = CAPTION_AND_ICON_INFO
- {
- };
+ screen_mode = EQikScreenModeSmallPortrait;
+ caption_and_icon = CAPTION_AND_ICON_INFO
+ {
+ };
},
- VIEW_DATA
- {
- uid = 0x10000001;
- screen_mode = EQikScreenModeSmallPortrait;
- caption_and_icon = CAPTION_AND_ICON_INFO
- {
- };
+ VIEW_DATA
+ {
+ uid = 0x10000001;
+ screen_mode = EQikScreenModeSmallPortrait;
+ caption_and_icon = CAPTION_AND_ICON_INFO
+ {
+ };
}
};
}
diff --git a/backends/platform/symbian/UIQ3/scummvm_reg.rss b/backends/platform/symbian/UIQ3/scummvm_reg.rss
index df99094b2e..1156694bd7 100644
--- a/backends/platform/symbian/UIQ3/scummvm_reg.rss
+++ b/backends/platform/symbian/UIQ3/scummvm_reg.rss
@@ -1,14 +1,14 @@
-// All registration files need to #include appinfo.rh.
+// All registration files need to #include appinfo.rh.
#include <AppInfo.rh>
-// All registration files must define UID2, which is always
+// All registration files must define UID2, which is always
// KUidAppRegistrationResourceFile, and UID3, which is the application's UID.
UID2 KUidAppRegistrationResourceFile
UID3 0xA0000657 // application UID
// Registration file need to containo an APP_REGISTRATION_INFO resource that
-// minimally needs to provide the name of the application binary (using the
-// app_file statement).
+// minimally needs to provide the name of the application binary (using the
+// app_file statement).
RESOURCE APP_REGISTRATION_INFO
{
app_file = "ScummVM"; // filename of application binary (minus extension)
diff --git a/backends/platform/symbian/mmp/scummvm_base.mmp.in b/backends/platform/symbian/mmp/scummvm_base.mmp.in
index 2ba09b473b..13df4c2460 100644
--- a/backends/platform/symbian/mmp/scummvm_base.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_base.mmp.in
@@ -36,7 +36,7 @@ ALWAYS_BUILD_AS_ARM
//START_AUTO_MACROS_MASTER//
// empty base file, will be updated by Perl build scripts
-
+
// list of possible MACROs: (will be replaced when generating scummvm_base.mmp)
//MACRO USE_ZLIB // LIB:zlib.lib
//MACRO USE_MAD // LIB:libmad.lib
@@ -69,7 +69,7 @@ USERINCLUDE ..\..\..\..\backends\fs ..\src ..\..\..\..\backends\platform\sdl
SYSTEMINCLUDE \epoc32\include\ESDL
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include\tremor
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/mmp/scummvm_igor.mmp.in b/backends/platform/symbian/mmp/scummvm_igor.mmp.in
index 8ae3d400df..fa9ea0b3f9 100644
--- a/backends/platform/symbian/mmp/scummvm_igor.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_igor.mmp.in
@@ -50,6 +50,6 @@ SOURCEPATH ..\..\..\..\engines\igor
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\..\engines
USERINCLUDE ..\..\..\.. ..\..\..\..\common ..\..\..\..\gui ..\..\..\..\sound ..\src
SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_lure.mmp.in b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
index 29afe56182..5469c3e0af 100644
--- a/backends/platform/symbian/mmp/scummvm_lure.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_lure.mmp.in
@@ -50,6 +50,6 @@ SOURCEPATH ..\..\..\..\engines\lure
// *** Include paths
-USERINCLUDE ..\..\..\..\engines
+USERINCLUDE ..\..\..\..\engines
USERINCLUDE ..\..\..\.. ..\..\..\..\common ..\..\..\..\gui ..\..\..\..\sound ..\src
SYSTEMINCLUDE \epoc32\include \epoc32\include\libc ..\src
diff --git a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
index 16ae2e763a..a079297364 100644
--- a/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
+++ b/backends/platform/symbian/mmp/scummvm_scumm.mmp.in
@@ -66,6 +66,6 @@ USERINCLUDE ..\..\..\..\engines ..\..\..\..\engines\scumm\smush ..\..\..\..\
USERINCLUDE ..\..\..\.. ..\..\..\..\common ..\..\..\..\gui ..\..\..\..\sound ..\src
SYSTEMINCLUDE \epoc32\include\ZLIB // before \epoc32\include because symbian already has older version
-SYSTEMINCLUDE \epoc32\include\libc
+SYSTEMINCLUDE \epoc32\include\libc
SYSTEMINCLUDE \epoc32\include
SYSTEMINCLUDE ..\src // for portdefs.h
diff --git a/backends/platform/symbian/res/ScummVmAif.rss b/backends/platform/symbian/res/ScummVmAif.rss
index ad222e550b..a25b78552d 100644
--- a/backends/platform/symbian/res/ScummVmAif.rss
+++ b/backends/platform/symbian/res/ScummVmAif.rss
@@ -30,7 +30,7 @@ RESOURCE AIF_DATA
hidden=KAppNotHidden;
embeddability=KAppNotEmbeddable;
caption_list=
- {
+ {
CAPTION { code=ELangEnglish; caption="ScummVM"; },
CAPTION { code=ELangAmerican; caption="ScummVM"; },
CAPTION { code=ELangOther; caption="ScummVM"; }
diff --git a/backends/platform/symbian/res/scummvm.rss b/backends/platform/symbian/res/scummvm.rss
index 684e42f4e5..40a4aa4c11 100644
--- a/backends/platform/symbian/res/scummvm.rss
+++ b/backends/platform/symbian/res/scummvm.rss
@@ -26,10 +26,10 @@
NAME SCUM
// Include definitions of resource STRUCTS used by this
-// resource script
+// resource script
#include <eikon.rh>
#include "..\src\Scummvm.hrh"
-// Include the standard Eikon resource ids
+// Include the standard Eikon resource ids
#include <eikon.rsg>
@@ -52,11 +52,11 @@ RESOURCE MENU_BAR r_scum_menubar // ***
};
}
-RESOURCE MENU_PANE r_scum_menu // *** Submenu
+RESOURCE MENU_PANE r_scum_menu // *** Submenu
{
items =
{
-
+
MENU_ITEM{command = EEikCmdExit;txt = "Exit";}
};
}
diff --git a/backends/platform/symbian/src/ScummApp.cpp b/backends/platform/symbian/src/ScummApp.cpp
index 3c3c0dc065..cb08ccdd42 100644
--- a/backends/platform/symbian/src/ScummApp.cpp
+++ b/backends/platform/symbian/src/ScummApp.cpp
@@ -30,7 +30,7 @@
#if defined (__WINS__) && !defined (__SERIES60_30__) && !defined (UIQ3)
extern "C" int _chkstk(int /*a*/) {
_asm {
- push ecx
+ push ecx
cmp eax,_PAGESIZE_
lea ecx,[esp] + 8
jb short lastpage
@@ -66,7 +66,7 @@ _asm {
// this function is called automatically by the SymbianOS to deliver the new CApaApplication object
#if !defined (UIQ3) && !defined (S60V3)
-EXPORT_C
+EXPORT_C
#endif
CApaApplication* NewApplication() {
// Return pointer to newly created CQMApp
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index 008bf3ccb5..8fc35e9f8d 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -35,10 +35,10 @@ namespace GUI {
// SumthinWicked says: we either split our Actions like WinCE did with Pocket/Smartphone
// or we put them in this file separated by #ifdefs, this one is up to you, AnotherGuest :)
-
-const Common::String actionNames[] = {
- "Up",
- "Down",
+
+const Common::String actionNames[] = {
+ "Up",
+ "Down",
"Left",
"Right",
"Left Click",
@@ -48,8 +48,8 @@ const Common::String actionNames[] = {
"Zone",
"Multi Function",
"Swap character",
- "Skip text",
- "Pause",
+ "Skip text",
+ "Pause",
"Fast mode",
"Quit",
"Debugger"
@@ -100,7 +100,7 @@ SymbianActions::SymbianActions()
void SymbianActions::initInstanceMain(OSystem *mainSystem) {
Actions::initInstanceMain(mainSystem);
-
+
// Mouse Up
_action_enabled[ACTION_UP] = true;
@@ -154,24 +154,24 @@ void SymbianActions::initInstanceGame() {
_action_enabled[ACTION_SAVE] = false;
else {
_action_enabled[ACTION_SAVE] = true;
-
- if (is_queen) {
+
+ if (is_queen) {
_key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); // F1 key for FOTAQ
- } else if (is_sky) {
- _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5);
- } else if (is_cine) {
+ } else if (is_sky) {
+ _key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5);
+ } else if (is_cine) {
_key_action[ACTION_SAVE].setKey(Common::ASCII_F10, Common::KEYCODE_F10); // F10
- } else if (is_agi) {
+ } else if (is_agi) {
_key_action[ACTION_SAVE].setKey(Common::ASCII_ESCAPE, Common::KEYCODE_ESCAPE);
} else if (is_parallaction) {
_key_action[ACTION_SAVE].setKey('s', Common::KEYCODE_s);
- } else {
+ } else {
_key_action[ACTION_SAVE].setKey(Common::ASCII_F5, Common::KEYCODE_F5); // F5 key
}
}
// Quit
_action_enabled[ACTION_QUIT] = true;
-
+
// Skip text
if (!is_cine && !is_parallaction)
_action_enabled[ACTION_SKIP_TEXT] = true;
@@ -184,7 +184,7 @@ void SymbianActions::initInstanceGame() {
// Enable fast mode
_action_enabled[ACTION_FASTMODE] = true;
_key_action[ACTION_FASTMODE].setKey('f', Common::KEYCODE_f, KMOD_CTRL);
-
+
// Swap character
_action_enabled[ACTION_SWAPCHAR] = true;
_key_action[ACTION_SWAPCHAR].setKey('b'); // b
diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp
index bca7b86a07..e76f6a93df 100644
--- a/backends/platform/symbian/src/SymbianOS.cpp
+++ b/backends/platform/symbian/src/SymbianOS.cpp
@@ -47,7 +47,7 @@ namespace Symbian {
// Show a simple Symbian Info win with Msg & exit
void FatalError(const char *msg) {
- TPtrC8 msgPtr((const TUint8 *)msg);
+ TPtrC8 msgPtr((const TUint8 *)msg);
TBuf<512> msg16Bit;
msg16Bit.Copy(msgPtr);
#ifdef S60
@@ -60,7 +60,7 @@ void FatalError(const char *msg) {
// make this easily available everywhere
char* GetExecutablePath() {
- return CSDLApp::GetExecutablePathCStr();
+ return CSDLApp::GetExecutablePathCStr();
}
} // namespace Symbian {
@@ -89,12 +89,12 @@ bool OSystem_SDL_Symbian::hasFeature(Feature f) {
}
void OSystem_SDL_Symbian::setFeatureState(Feature f, bool enable) {
- switch(f) {
- case kFeatureVirtualKeyboard:
- if (enable) {
+ switch(f) {
+ case kFeatureVirtualKeyboard:
+ if (enable) {
}
else {
-
+
}
break;
case kFeatureDisableKeyFiltering:
@@ -123,15 +123,15 @@ void OSystem_SDL_Symbian::initBackend() {
#endif
ConfMan.setInt("joystick_num", 0); // Symbian OS should have joystick_num set to 0 in the ini file , but uiq devices might refuse opening the joystick
ConfMan.flushToDisk();
-
+
GUI::Actions::init();
OSystem_SDL::initBackend();
-
+
// Initialize global key mapping for Smartphones
GUI::Actions* actions = GUI::Actions::Instance();
- actions->initInstanceMain(this);
+ actions->initInstanceMain(this);
actions->loadMapping();
initZones();
}
@@ -157,7 +157,7 @@ bool OSystem_SDL_Symbian::setGraphicsMode(const char * /*name*/) {
void OSystem_SDL_Symbian::quitWithErrorMsg(const char * /*aMsg*/) {
CEikonEnv::Static()->AlertWin(_L("quitWithErrorMsg()")) ;
-
+
if (g_system)
g_system->quit();
}
@@ -171,7 +171,7 @@ void OSystem_SDL_Symbian::quit() {
bool OSystem_SDL_Symbian::setSoundCallback(SoundProc proc, void *param) {
// First save the proc and param
- _sound_proc_param = param;
+ _sound_proc_param = param;
_sound_proc = proc;
SDL_AudioSpec desired;
SDL_AudioSpec obtained;
@@ -267,11 +267,11 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
return false;
for (TInt loop = 0; loop < GUI::ACTION_LAST; loop++) {
- if (GUI::Actions::Instance()->getMapping(loop) == ev.key.keysym.sym &&
+ if (GUI::Actions::Instance()->getMapping(loop) == ev.key.keysym.sym &&
GUI::Actions::Instance()->isEnabled(loop)) {
// Create proper event instead
switch(loop) {
- case GUI::ACTION_UP:
+ case GUI::ACTION_UP:
if (ev.type == SDL_KEYDOWN) {
_km.y_vel = -1;
_km.y_down_count = 1;
@@ -282,7 +282,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
- return true;
+ return true;
case GUI::ACTION_DOWN:
if (ev.type == SDL_KEYDOWN) {
@@ -295,7 +295,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _km.x, _km.y);
- return true;
+ return true;
case GUI::ACTION_LEFT:
if (ev.type == SDL_KEYDOWN) {
@@ -337,8 +337,8 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
case GUI::ACTION_ZONE:
if (ev.type == SDL_KEYDOWN) {
- int i;
-
+ int i;
+
for (i=0; i < TOTAL_ZONES; i++)
if (_km.x >= _zones[i].x && _km.y >= _zones[i].y &&
_km.x <= _zones[i].x + _zones[i].width && _km.y <= _zones[i].y + _zones[i].height
@@ -352,7 +352,7 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
_currentZone = 0;
event.type = Common::EVENT_MOUSEMOVE;
fillMouseEvent(event, _mouseXZone[_currentZone], _mouseYZone[_currentZone]);
- SDL_WarpMouse(event.mouse.x, event.mouse.y);
+ SDL_WarpMouse(event.mouse.x, event.mouse.y);
}
return true;
@@ -376,24 +376,24 @@ bool OSystem_SDL_Symbian::remapKey(SDL_Event &ev, Common::Event &event) {
ev.key.keysym.scancode = 0;
ev.key.keysym.mod = (SDLMod) key.flags();
- // Translate from SDL keymod event to Scummvm Key Mod Common::Event.
+ // Translate from SDL keymod event to Scummvm Key Mod Common::Event.
// This codes is also present in GP32 backend and in SDL backend as a static function
- // Perhaps it should be shared.
- if (key.flags() != 0) {
+ // Perhaps it should be shared.
+ if (key.flags() != 0) {
event.kbd.flags = 0;
if (ev.key.keysym.mod & KMOD_SHIFT)
event.kbd.flags |= Common::KBD_SHIFT;
-
+
if (ev.key.keysym.mod & KMOD_ALT)
event.kbd.flags |= Common::KBD_ALT;
-
+
if (ev.key.keysym.mod & KMOD_CTRL)
event.kbd.flags |= Common::KBD_CTRL;
}
return false;
- }
+ }
case GUI::ACTION_QUIT:
{
@@ -447,20 +447,20 @@ FILE* symbian_fopen(const char* name, const char* mode) {
TInt modeLen = strlen(mode);
TPtrC8 namePtr((unsigned char*) name, strlen(name));
- TFileName tempFileName;
+ TFileName tempFileName;
tempFileName.Copy(namePtr);
-
+
TInt fileMode = EFileRead;
-
+
if (mode[0] == 'a')
fileMode = EFileWrite;
-
+
if (!((modeLen > 1 && mode[1] == 'b') || (modeLen > 2 && mode[2] == 'b'))) {
fileMode |= EFileStreamText;
}
-
+
if ((modeLen > 1 && mode[1] == '+') || (modeLen > 2 && mode[2] == '+')) {
- fileMode = fileMode| EFileWrite;
+ fileMode = fileMode| EFileWrite;
}
fileMode = fileMode| EFileShareAny;
@@ -474,13 +474,13 @@ FILE* symbian_fopen(const char* name, const char* mode) {
}
}
break;
- case 'r':
+ case 'r':
if (fileEntry->iFileHandle.Open(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) {
delete fileEntry;
fileEntry = NULL;
}
break;
-
+
case 'w':
if (fileEntry->iFileHandle.Replace(CEikonEnv::Static()->FsSession(), tempFileName, fileMode) != KErrNone) {
delete fileEntry;
@@ -502,7 +502,7 @@ size_t symbian_fread(const void* ptr, size_t size, size_t numItems, FILE* handle
TPtr8 pointer( (unsigned char*) ptr, size*numItems);
((TSymbianFileEntry*)(handle))->iFileHandle.Read(pointer);
-
+
return pointer.Length()/size;
}
@@ -552,7 +552,7 @@ int symbian_fseek(FILE* handle, long int offset, int whence) {
case SEEK_END:
seekMode = ESeekEnd;
break;
-
+
}
return ((TSymbianFileEntry*)(handle))->iFileHandle.Seek(seekMode, pos);
diff --git a/backends/platform/symbian/src/main_features.inl b/backends/platform/symbian/src/main_features.inl
index 66b0c4b200..8a44d0edf2 100644
--- a/backends/platform/symbian/src/main_features.inl
+++ b/backends/platform/symbian/src/main_features.inl
@@ -24,7 +24,7 @@
"Vibra "
#endif
"\n"
-
+
// we want a list of supported engines visible in the program,
// because we also release special builds with only one engine
#ifndef DISABLE_SCUMM
diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h
index 4299eb59ad..cfaafe9ece 100644
--- a/backends/platform/symbian/src/portdefs.h
+++ b/backends/platform/symbian/src/portdefs.h
@@ -57,7 +57,7 @@
#define SIGND(fp) ((fp.l.upper) & SIGNBIT)
#define HIDDEND_LL ((long long)1 << 52)
#define MANTD_LL(fp) ((fp.ll & (HIDDEND_LL-1)) | HIDDEND_LL)
-
+
union double_long {
double d;
struct {
@@ -73,36 +73,36 @@
register union double_long dl1;
register int exp;
register long long l;
-
+
dl1.d = a1;
-
+
if (!dl1.l.upper && !dl1.l.lower)
return (0);
-
+
exp = EXPD (dl1) - EXCESSD - 64;
l = MANTD_LL(dl1);
-
+
if (exp > 0) {
l = (long long)1<<63;
if (!SIGND(dl1))
l--;
return l;
}
-
+
/* shift down until exp = 0 or l = 0 */
if (exp < 0 && exp > -64 && l)
l >>= -exp;
else
return (0);
-
+
return (SIGND (dl1) ? -l : l);
}
-
+
/* okay, okay: I admit it: I absolutely have _NO_ idea why __fixdfdi does not get linked in by gcc from libgcc.a
because I know it's in there: I checked with `ar x _fixdfdi.o libgcc.a` and the symbol is in there, so I'm lost
and had to fix it this way. I tried all gcc and ld options I could find: no hope :( If someone can enlighten me:
feel free to let me know at sumthinwicked@users.sf.net! Much obliged.
- PS1. I think for __fixunsdfdi they have made a circumvention by having to add STATICLIBRARY EGCC.LIB
+ PS1. I think for __fixunsdfdi they have made a circumvention by having to add STATICLIBRARY EGCC.LIB
PS2. http://gcc.gnu.org/ml/gcc-bugs/2004-01/msg01596.html might have found out the same problem there
*/
@@ -117,7 +117,7 @@
return strlen(str);
}
- int inline scumm_vsnprintf (char *str, unsigned long /*n*/, char const *fmt, va_list valist) {
+ int inline scumm_vsnprintf (char *str, unsigned long /*n*/, char const *fmt, va_list valist) {
vsprintf(str, fmt, valist);
return strlen(str);
}
diff --git a/backends/platform/wince/CEActionsPocket.cpp b/backends/platform/wince/CEActionsPocket.cpp
index 805a9d9c08..81d03210a5 100644
--- a/backends/platform/wince/CEActionsPocket.cpp
+++ b/backends/platform/wince/CEActionsPocket.cpp
@@ -286,7 +286,7 @@ bool CEActionsPocket::perform(GUI::ActionType action, bool pushed) {
return true;
case POCKET_ACTION_RIGHT:
_CESystem->move_cursor_right();
- return true;
+ return true;
case POCKET_ACTION_QUIT:
{
GUI::MessageDialog alert(" Are you sure you want to quit ? ", "Yes", "No");
diff --git a/backends/platform/wince/CEActionsSmartphone.cpp b/backends/platform/wince/CEActionsSmartphone.cpp
index fd67b16be9..7bc26a283d 100644
--- a/backends/platform/wince/CEActionsSmartphone.cpp
+++ b/backends/platform/wince/CEActionsSmartphone.cpp
@@ -226,7 +226,7 @@ bool CEActionsSmartphone::perform(GUI::ActionType action, bool pushed) {
return true;
case SMARTPHONE_ACTION_RIGHT:
_CESystem->move_cursor_right();
- return true;
+ return true;
case SMARTPHONE_ACTION_ZONE:
_CESystem->switch_zone();
return true;
diff --git a/backends/platform/wince/CEDevice.cpp b/backends/platform/wince/CEDevice.cpp
index dccbc2208b..98a8fb95f6 100644
--- a/backends/platform/wince/CEDevice.cpp
+++ b/backends/platform/wince/CEDevice.cpp
@@ -102,7 +102,7 @@ void CEDevice::init() {
backlight_xchg();
REG_tampered = true;
SystemParametersInfo(SPI_GETBATTERYIDLETIMEOUT, 0, (void *) &bat_timeout, 0);
- SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, 60 * 60 * 2, NULL, SPIF_SENDCHANGE);
+ SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, 60 * 60 * 2, NULL, SPIF_SENDCHANGE);
}
void CEDevice::end() {
@@ -110,7 +110,7 @@ void CEDevice::end() {
_ReleasePowerRequirement(_hPowerManagement);
if (REG_tampered)
backlight_xchg();
- SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, bat_timeout, NULL, SPIF_SENDCHANGE);
+ SystemParametersInfo(SPI_SETBATTERYIDLETIMEOUT, bat_timeout, NULL, SPIF_SENDCHANGE);
}
void CEDevice::wakeUp() {
diff --git a/backends/platform/wince/CEScaler.cpp b/backends/platform/wince/CEScaler.cpp
index d225b908c9..f02d6dea0c 100644
--- a/backends/platform/wince/CEScaler.cpp
+++ b/backends/platform/wince/CEScaler.cpp
@@ -105,7 +105,7 @@ void PocketPCLandscapeAspect(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr
p2 = *((uint16*)inbuf+j); inbuf += srcPitch16;
*((uint16*)outbuf+j) = MAKEPIXEL(P20(RB(p1))+P80(RB(p2)),P20(G(p1))+P80(G(p2))); outbuf += dstPitch16;
- p1 = p2;
+ p1 = p2;
p2 = *((uint16*)inbuf+j); inbuf += srcPitch16;
*((uint16*)outbuf+j) = MAKEPIXEL(P40(RB(p1))+P60(RB(p2)),P40(G(p1))+P60(G(p2))); outbuf += dstPitch16;
@@ -118,10 +118,10 @@ void PocketPCLandscapeAspect(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr
*((uint16*)outbuf+j) = MAKEPIXEL(P80(RB(p1))+P20(RB(p2)),P80(G(p1))+P20(G(p2))); outbuf += dstPitch16;
*((uint16*)outbuf+j) = p2;
-
- inbuf = inbuf - srcPitch16*4;
- outbuf = outbuf - dstPitch16*5;
- }
+
+ inbuf = inbuf - srcPitch16*4;
+ outbuf = outbuf - dstPitch16*5;
+ }
inbuf = inbuf + srcPitch16*5;
outbuf = outbuf + dstPitch16*6;
}
diff --git a/backends/platform/wince/Makefile b/backends/platform/wince/Makefile
index 325cc11391..ea716b7b19 100644
--- a/backends/platform/wince/Makefile
+++ b/backends/platform/wince/Makefile
@@ -119,7 +119,7 @@ LIBS += -lzlib
endif
ifdef USE_MAD
-DEFINES += -DUSE_MAD
+DEFINES += -DUSE_MAD
LIBS += -lmad
endif
@@ -157,17 +157,17 @@ endif
EXECUTABLE = scummvm.exe
CXXFLAGS := $(CFLAGS)
-OBJS :=
+OBJS :=
MODULE_DIRS += .
OBJS += CEActionsPocket.o CEDevice.o CEScaler.o \
- CEActionsSmartphone.o CELauncherDialog.o wince-sdl.o
+ CEActionsSmartphone.o CELauncherDialog.o wince-sdl.o
OBJS += CEgui/GUIElement.o CEgui/Panel.o CEgui/SDL_ImageResource.o \
CEgui/ItemAction.o CEgui/PanelItem.o CEgui/Toolbar.o \
- CEgui/ItemSwitch.o CEgui/PanelKeyboard.o CEgui/ToolbarHandler.o
+ CEgui/ItemSwitch.o CEgui/PanelKeyboard.o CEgui/ToolbarHandler.o
OBJS += CEkeys/EventsBuffer.o
-OBJS += $(srcdir)/gui/Actions.o $(srcdir)/gui/Key.o $(srcdir)/gui/KeysDialog.o
-OBJS += ../sdl/sdl.o ../sdl/graphics.o ../sdl/events.o
+OBJS += $(srcdir)/gui/Actions.o $(srcdir)/gui/Key.o $(srcdir)/gui/KeysDialog.o
+OBJS += ../sdl/sdl.o ../sdl/graphics.o ../sdl/events.o
OBJS += missing/missing.o
OBJS += ARMscaler.o
ifndef BUILD_PLUGINS
diff --git a/backends/platform/wince/README-WinCE.txt b/backends/platform/wince/README-WinCE.txt
index bb9f88185e..f4cb00dcfa 100644
--- a/backends/platform/wince/README-WinCE.txt
+++ b/backends/platform/wince/README-WinCE.txt
@@ -12,14 +12,14 @@ In order to accommodate for the requirements of the lure engine, the
usage characteristics of the 'Free Look' action have been improved. The
new behavior is available for use in all engines, but is is *strongly*
recommended for at least when playing 'Lure of the Temptress'. By using
-the new scheme, when in 'Free Look' mode, it is now possible to enter
-left clicks by clicking a second time near the current location of the
+the new scheme, when in 'Free Look' mode, it is now possible to enter
+left clicks by clicking a second time near the current location of the
mouse pointer. Left and Right clicks at the current point location
are also available by using the respective actions' bound key.
- Reduced optimization build
The ScummVM executable has grown quite large, prohibiting some devices
-from running memory demanding games (or any games at all). Code
+from running memory demanding games (or any games at all). Code
optimization level has been reduced to offset the growth of the executable.
Games run slightly slower. This will be addressed before next release.
@@ -45,12 +45,12 @@ Official build
--------------
The official build is based on the ARM architecture and should work with any
-Pocket PC 2002, Pocket PC 2003, Pocket PC 2003 SE, Smartphone 2002,
+Pocket PC 2002, Pocket PC 2003, Pocket PC 2003 SE, Smartphone 2002,
Smartphone 2003 or Windows Mobile 5 and 6 based device. It is known to work
on Pocket PC 2000 devices, but it has not been officially tested.
-Support for old ARM architectures (Handheld PCs, Palm Size PCs) and other CPUs
-(MIPS, SH3) is discontinued. Feel free to generate builds for these
+Support for old ARM architectures (Handheld PCs, Palm Size PCs) and other CPUs
+(MIPS, SH3) is discontinued. Feel free to generate builds for these
architectures and contact us to include them on ScummVM website.
Games supported
@@ -60,14 +60,14 @@ The Windows CE port of ScummVM supports all available game engines.
ScummVM distinguishes devices based on two characteristics: Type and resolution.
Supported types of devices are Smartphones (usually no stylus) and Pocket PCs
-(stylus). The supported resolutions are 176x220 (Smartphone), 240x240 (QVGA
+(stylus). The supported resolutions are 176x220 (Smartphone), 240x240 (QVGA
square), 240x320 (QVGA), 320x240 (QVGA landscape), 480x640 (VGA). Devices with
resolutions larger than VGA should also be supported with automatic screen
centering.
* Low resolution Smartphones (176x220)
-Support is only provided for all 320x200 or 320x240 games. The font can get
+Support is only provided for all 320x200 or 320x240 games. The font can get
hard to read (you should prefer talkie games, or wear glasses :-P)
Games with 640x480 resolution such as COMI or BSWORD cannot be scaled down
to this resolution and still be playable.
@@ -81,7 +81,7 @@ Only 320x200 or 320x240 games are supported due to lack of downsampling scaler.
All games are playable in these devices. Landscape devices may not be able to
rotate the screen around.
-* VGA (640x480) or higher Pocket PCs
+* VGA (640x480) or higher Pocket PCs
All non VGA games should work properly on these devices. They can be resized
with different scalers. Moreover, VGA games will be displayed in true VGA mode.
@@ -109,8 +109,8 @@ and report your success ...
How do I install ScummVM for Windows CE ?
-----------------------------------------
-Simple! Unpack the release package on your desktop pc, then copy all its contents
-to a folder on your device. Typically, you should at least have scummvm.exe,
+Simple! Unpack the release package on your desktop pc, then copy all its contents
+to a folder on your device. Typically, you should at least have scummvm.exe,
modern.ini and modern.zip in the same directory. Finally, upload your beloved games
and fire it up :-)
@@ -119,8 +119,8 @@ Some devices (like Pocket PC 2000) require GAPI to be present.
How do I install a game ?
-------------------------
-You'll at least need to copy all the data files from your game, in a
-sub-directory of your game directory.
+You'll at least need to copy all the data files from your game, in a
+sub-directory of your game directory.
You'll need to put the data files in a directory named after ScummVM game
name (see "Supported Games" section in ScummVM readme) for the games having
@@ -134,7 +134,7 @@ the ScummVM readme. If you are running these games on a slow device with Ogg
Vorbis compression, it's recommended to sample the files to 11 kHz (this sample
rate is not supported by other versions of ScummVM).
-If you need more details, you can check SirDave's mini-manual online available
+If you need more details, you can check SirDave's mini-manual online available
at: http://forums.scummvm.org/viewtopic.php?t=936
and at: http://www.pocketmatrix.com/forums/viewtopic.php?t=8606
@@ -142,14 +142,14 @@ How do I run a game ?
---------------------
If it's the first time you're running ScummVM for Windows CE, have installed or
-removed games, you need to rescan your game directory.
+removed games, you need to rescan your game directory.
* Select Add Game, tap the root directory of your games, and tap "Yes" to begin
- an automatic scan of the installed games.
+ an automatic scan of the installed games.
-Usually all games are detected and you can start playing right away. If your
+Usually all games are detected and you can start playing right away. If your
game is not detected check its directory name and your data files.
-To play a game, tap on its name then tap the "Start" button or double tap its
+To play a game, tap on its name then tap the "Start" button or double tap its
name.
How do I play a game on a Pocket PC or Handheld PC device ?
@@ -161,14 +161,14 @@ As the Pocket PC lacks some keys, a toolbar is displayed at the bottom of the
screen to make the most common functions just a tap away
* The disk icon opens ScummVM options menu to save your game, or change your
current game settings (depends on the game)
- * The movie icon skips a non interactive sequence, the current dialog or
+ * The movie icon skips a non interactive sequence, the current dialog or
behaves like the ESC key on a regular keyboard (depends on the game)
* The sound icon turns all sound effects and music off and on
* The key icon allow you to map a key action to a device button
* The monkey icon switches between portrait, landscape and inverse landscape
mode (depends on the display drivers)
-You can map additional actions on your device hardware buttons using the
+You can map additional actions on your device hardware buttons using the
"Options" / "Key" menu in the ScummVM options menu. To associate an action to
a key, tap the action, then the "Map" button and press the hardware key.
The following actions are available :
@@ -176,17 +176,17 @@ The following actions are available :
* Pause : pause the game
* Save : open ScummVM option menu
* Quit : quit ScummVM (without saving, be careful when using it)
- * Skip : skip a non interactive sequence, the current dialog or
+ * Skip : skip a non interactive sequence, the current dialog or
behaves like the ESC key on a regular keyboard
* Hide : hide or display the toolbar
* Keyboard : hide or display the virtual keyboard
* Sound : turns all sound effects and music off and on
* Right click : acts as a right mouse button click
* Cursor : hide or display the mouse cursor
- * Free look : go in or out of free-look mode. In this mode, you can tap
+ * Free look : go in or out of free-look mode. In this mode, you can tap
the screen to look for interesting locations without walking.
Cling a second time near the pointer's location equals to left click.
- * Zoom up : magnify the upper part of the screen for 640x480 games
+ * Zoom up : magnify the upper part of the screen for 640x480 games
rendered on a QVGA device.
* Zoom down : magnify the lower part of the screen for 640x480 games
rendered on a QVGA device.
@@ -230,7 +230,7 @@ ratio correction) for better gaming experience.
How do I play a game on a Smartphone device ?
---------------------------------------------
-On non-stylus devices, the mouse cursor is emulated via a set of keys.
+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.
@@ -242,7 +242,7 @@ the list of available actions for Smartphones:
Left Click :
Right Click :
* Save : open ScummVM option menu
- * Skip : skip a non interactive sequence, the current dialog or
+ * Skip : skip a non interactive sequence, the current dialog or
behaves like the ESC key on a regular keyboard
* Zone : switch between the 3 different mouse zones
* Multi Function : this key performs a different function depending on the game
@@ -255,10 +255,10 @@ the list of available actions for Smartphones:
* Rotate : rotate the screen (also rotates dpad keys)
* Quit : quit ScummVM (without saving, be careful when using it)
-The "Zone" key is a *very* valuable addition allowing you to jump quickly
-between three screen zones : the game zone, the verbs zone and the inventory
+The "Zone" key is a *very* valuable addition allowing you to jump quickly
+between three screen zones : the game zone, the verbs zone and the inventory
zone. When you switch to a zone the cursor will be reset to its former location
-in this zone.
+in this zone.
The default key map for these actions is:
@@ -287,11 +287,11 @@ Some parameters are specific to this port :
Game specific sections (f.e. [monkey2]) - performance options
- * high_sample_rate bool Desktop quality (22 kHz) sound output if set.
- 11 kHz otherwise. The default is 11 kHz.
+ * high_sample_rate bool Desktop quality (22 kHz) sound output if set.
+ 11 kHz otherwise. The default is 11 kHz.
If you have a fast device, you can set this to
true to enjoy better sound effects and music.
- * FM_high_quality bool Desktop quality FM synthesis if set. Lower
+ * FM_high_quality bool Desktop quality FM synthesis if set. Lower
quality otherwise. The default is low quality.
You can change this if you have a fast device.
* sound_thread_priority int Set the priority of the sound thread (0, 1, 2).
@@ -302,7 +302,7 @@ Game specific sections (f.e. [monkey2]) - performance options
you prefer better audio/video synchronization.
* Smush_force_redraw int Force a Smush frame redraw every X missed
frames. Mainly used for Full Throttle action
- sequences. Setting it lower gives more
+ sequences. Setting it lower gives more
priority to screen redraws. Setting it higher
gives more priority to stylus/keyboard input.
The default is 30.
@@ -316,7 +316,7 @@ Game specific sections (f.e. [monkey2]) - game options
[scummvm] section - keys definition
-You usually do not wish to modify these values directly, as they are set
+You usually do not wish to modify these values directly, as they are set
by the option dialog, and are only given here for reference.
* action_mapping_version int Mapping version linked to ScummVM version.
@@ -351,7 +351,7 @@ You can tweak these parameters to customize how the cursor is handled.
repeated more than repeatY.
------------------------------------------------------------------------
-Game specific questions
+Game specific questions
------------------------------------------------------------------------
---------------
@@ -432,9 +432,9 @@ You need to map the right click button (see the General Questions section).
I'm experiencing random crashes ...
------------------------------------
-This game has high memory requirements, and may crash sometimes on low
+This game has high memory requirements, and may crash sometimes on low
memory devices. Continue your game with the latest automatically saved
-game and everything should be fine.
+game and everything should be fine.
You can consider removing the music and voice files (VOXDISK.BUN, MUSDISK.BUN)
to lower these requirements.
@@ -450,10 +450,10 @@ Use a faster device :-(
I'm experiencing random crashes ...
------------------------------------
-This game has high memory requirements, and may crash sometimes on low
+This game has high memory requirements, and may crash sometimes on low
memory devices. Continue your game with the latest automatically saved
-game and everything should be fine.
-You can consider removing the voice file (MONSTER.SOU) and disable the
+game and everything should be fine.
+You can consider removing the voice file (MONSTER.SOU) and disable the
music to lower these requirements.
----------------------------------------
@@ -499,9 +499,9 @@ quit the game.
I'm experiencing random crashes ...
------------------------------------
-This game has high memory requirements, and may crash sometimes on low
+This game has high memory requirements, and may crash sometimes on low
memory devices. Continue your game with the latest automatically saved
-game and everything should be fine.
+game and everything should be fine.
You can consider removing the music and voice files (VOXDISK.BUN, MUSDISK.BUN)
to lower these requirements.
@@ -568,7 +568,7 @@ with dpad enter. Check the main Readme file for more information on this.
The control scheme is awkward (Pocket PCs)
------------------------------------------
Map and use the 'Free Look' action. Since normal pointer operation is to
-enter a left click at each tap position, the free look mode enables
+enter a left click at each tap position, the free look mode enables
'hovering' the mouse on an object, then right clicking either by using the
double tap method or by pressing the 'Right Click' action. Also, a left click
can be entered while in free look mode, by clicking a second time near the
@@ -581,9 +581,9 @@ Support
Help, I've read everything and ...
-----------------------------------
-Luckily, as there is a huge variety of Windows CE devices, a specific forum
+Luckily, as there is a huge variety of Windows CE devices, a specific forum
is dedicated to this ScummVM port. You can ask your question on the WinCE
-ScummVM forum available at http://forums.scummvm.org/viewforum.php?f=6
+ScummVM forum available at http://forums.scummvm.org/viewforum.php?f=6
Some older questions and very nice tutorials are still available on the historic
PocketMatrix forum at http://www.pocketmatrix.com/forums/viewforum.php?f=20
@@ -593,7 +593,7 @@ many years now :)
I think I found a bug, ScummVM crashes in ...
---------------------------------------------
-See the "Reporting Bugs" section in ScummVM readme.
+See the "Reporting Bugs" section in ScummVM readme.
If you have a Pocket PC or Handheld PC, be sure to include its resolution (obtained
on the second dialog displayed on the "About" menu) in your bug report.
@@ -623,7 +623,7 @@ Old news follow ...
Major improvements have taken place in this version, mostly for behind-
the-scenes stuff. First, we have migrated to GCC for building the Windows
CE port. This helped take care of some obscure compiler bugs which were
-in there for quite a long time. It has also lead to efficient code
+in there for quite a long time. It has also lead to efficient code
generation due to GCC's advanced capabilities and consequently increased
runtime speed. The second important change was the overhaul of the SDL
library port. The benefits from this are twofold: The real-time code paths
@@ -632,6 +632,6 @@ functions. Further, the screen display and mouse/keyboard input code has
been partially rewritten to allow for increased compatibility across all
devices.
Due to the update of keyboard handling code, the keycodes have changed
-slightly. Running this version of ScummVM will overwrite your key bindings
-with the new defaults. See the section on how to play on Smartphones and
+slightly. Running this version of ScummVM will overwrite your key bindings
+with the new defaults. See the section on how to play on Smartphones and
Pocket PCs below for the new default key bindings.
diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp
index 1eb10c5355..86d93dcb88 100644
--- a/backends/platform/wince/missing/missing.cpp
+++ b/backends/platform/wince/missing/missing.cpp
@@ -33,7 +33,7 @@ char *strdup(const char *strSource);
#ifdef __GNUC__
#define EXT_C extern "C"
#else
-#define EXT_C
+#define EXT_C
#endif
// common missing functions required by both gcc and evc
@@ -155,7 +155,7 @@ int remove(const char* path)
int _access(const char *path, int mode) {
TCHAR fname[MAX_PATH];
MultiByteToWideChar(CP_ACP, 0, path, -1, fname, sizeof(fname)/sizeof(TCHAR));
-
+
WIN32_FIND_DATA ffd;
HANDLE h=FindFirstFile(fname, &ffd);
@@ -174,7 +174,7 @@ int _access(const char *path, int mode) {
return ffd.dwFileAttributes&FILE_ATTRIBUTE_READONLY?-1:0;
case 04: //Check Read permission
return 0; //Assume always have read permission
- }
+ }
//Bad mode value supplied, return failure
return -1;
}
diff --git a/backends/platform/wince/missing/time.h b/backends/platform/wince/missing/time.h
index 0fd241bdc5..f2bc5e4f89 100644
--- a/backends/platform/wince/missing/time.h
+++ b/backends/platform/wince/missing/time.h
@@ -20,7 +20,7 @@ struct tm
#ifdef __GNUC__
#define EXT_C extern "C"
#else
-#define EXT_C
+#define EXT_C
#endif
EXT_C time_t time(time_t* dummy);
diff --git a/backends/platform/wince/stub.cpp b/backends/platform/wince/stub.cpp
index 6cf525eb2a..9dad8638e1 100644
--- a/backends/platform/wince/stub.cpp
+++ b/backends/platform/wince/stub.cpp
@@ -41,7 +41,7 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPWSTR szCmdLine, int sw) {
* resolve imported symbols to a dll from an executable.
* 2) But wait! DLLs can have any way of importing/exporting symbols
* between them. Hmmm...
- *
+ *
* Right! The solution is thus: We build everything as a dll. This means
* the individual engines (plugins) and also the scummvm core application.
* It is in fact "The sub-DLL solution" described over at edll
diff --git a/backends/platform/wince/wince-sdl.cpp b/backends/platform/wince/wince-sdl.cpp
index dcfa345e43..3123baa7fb 100644
--- a/backends/platform/wince/wince-sdl.cpp
+++ b/backends/platform/wince/wince-sdl.cpp
@@ -170,14 +170,14 @@ int SDL_main(int argc, char **argv) {
extern void (*__CTOR_LIST__)() ;
void (**constructor)() = &__CTOR_LIST__ ;
constructor++ ;
- while (*constructor) {
+ while (*constructor) {
(*constructor)() ;
constructor++ ;
}
#endif
-
+
CEDevice::init();
-
+
/* Redirect standard input and standard output */
strcpy(stdout_fname, getcwd(NULL, MAX_PATH));
strcpy(stderr_fname, getcwd(NULL, MAX_PATH));
@@ -291,7 +291,7 @@ static int ParseCommandLine(char *cmdline, char **argv)
argc = 0;
for (bufp = cmdline; *bufp;) {
- // Skip leading whitespace
+ // Skip leading whitespace
while (isspace(*bufp))
++bufp;
@@ -592,7 +592,7 @@ void OSystem_WINCE3::swap_zoom_up() {
_scaleFactorYd = 1;
_scalerProc = PocketPCHalfZoom;
}
-
+
_zoomDown = false;
_zoomUp = true;
}
@@ -872,7 +872,7 @@ int OSystem_WINCE3::getOutputSampleRate() const {
void OSystem_WINCE3::setWindowCaption(const char *caption) {
check_mappings(); // called here to initialize virtual keys handling
-
+
//update_game_settings();
// finalize mixer init
get_sample_rate();
@@ -915,7 +915,7 @@ void OSystem_WINCE3::setFeatureState(Feature f, bool enable) {
_toolbarHandler.setActive(NAME_PANEL_KEYBOARD);
_toolbarHandler.setVisible(true);
}
- else
+ else
if (_panelStateForced) {
_panelStateForced = false;
_toolbarHandler.setActive(_saveActiveToolbar);
@@ -1122,7 +1122,7 @@ bool OSystem_WINCE3::update_scalers() {
_adjustAspectRatio = false;
if (CEDevice::hasPocketPCResolution()) {
- if ( (!_orientationLandscape && (_screenWidth == 320 || !_screenWidth))
+ if ( (!_orientationLandscape && (_screenWidth == 320 || !_screenWidth))
|| CEDevice::hasSquareQVGAResolution() ) {
if (getScreenWidth() != 320) {
_scaleFactorXm = 3;
@@ -1653,7 +1653,7 @@ void OSystem_WINCE3::internUpdateScreen() {
rout->w = routw; rout->h = routh;
numRectsOut++;
rout++;
-
+
}
SDL_UnlockSurface(srcSurf);
SDL_UnlockSurface(_hwscreen);
@@ -1759,7 +1759,7 @@ void OSystem_WINCE3::copyRectToOverlay(const OverlayColor *buf, int pitch, int x
}
if (w <= 0 || h <= 0)
- return;
+ return;
// Mark the modified region as dirty
_cksumValid = false;
@@ -1784,7 +1784,7 @@ void OSystem_WINCE3::copyRectToScreen(const byte *src, int pitch, int x, int y,
assert (_transactionMode == kTransactionNone);
assert(src);
- if (_screen == NULL)
+ if (_screen == NULL)
return;
Common::StackLock lock(_graphicsMutex); // Lock the mutex until this function ends
@@ -1898,7 +1898,7 @@ void OSystem_WINCE3::internDrawMouse() {
byte color;
const byte *src = _mouseData; // Image representing the mouse
int width;
-
+
// clip the mouse rect, and adjust the src pointer accordingly
if (x < 0) {
w += x;
@@ -1930,7 +1930,7 @@ void OSystem_WINCE3::internDrawMouse() {
if (!_overlayVisible) {
byte *bak = _mouseBackupOld; // Surface used to backup the area obscured by the mouse
byte *dst; // Surface we are drawing into
-
+
dst = (byte *)_screen->pixels + y * _screenWidth + x;
while (h > 0) {
width = w;
@@ -1947,11 +1947,11 @@ void OSystem_WINCE3::internDrawMouse() {
dst += _screenWidth - w;
h--;
}
-
+
} else {
uint16 *bak = (uint16 *)_mouseBackupOld; // Surface used to backup the area obscured by the mouse
byte *dst; // Surface we are drawing into
-
+
dst = (byte *)_overlayscreen->pixels + (y + 1) * _overlayscreen->pitch + (x + 1) * 2;
while (h > 0) {
width = w;
@@ -2022,7 +2022,7 @@ void OSystem_WINCE3::undrawMouse() {
} else {
byte *dst;
uint16 *bak = (uint16 *)_mouseBackupOld;
-
+
// No need to do clipping here, since drawMouse() did that already
dst = (byte *)_overlayscreen->pixels + (old_mouse_y + 1) * _overlayscreen->pitch + (old_mouse_x + 1) * 2;
for (y = 0; y < old_mouse_h; ++y, bak += _mouseBackupDim, dst += _overlayscreen->pitch)
@@ -2122,7 +2122,7 @@ void OSystem_WINCE3::drawMouse() {
// needs fixing, or remove it!
// FIXME
if (!(_toolbarHandler.visible() && _mouseCurState.y >= _toolbarHandler.getOffset() && !_usesEmulatedMouse) && !_forceHideMouse)
- internDrawMouse();
+ internDrawMouse();
}
void OSystem_WINCE3::fillMouseEvent(Common::Event &event, int x, int y) {
@@ -2320,7 +2320,7 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) {
_rbutton = true;
}
}
- _tapTime = 0;
+ _tapTime = 0;
} else {
_tapTime = GetTickCount();
_tapX = event.mouse.x;
@@ -2351,7 +2351,7 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) {
hotswapGFXMode();
}
return false;
- }
+ }
return true;
@@ -2391,7 +2391,7 @@ bool OSystem_WINCE3::pollEvent(Common::Event &event) {
case SDL_QUIT:
event.type = Common::EVENT_QUIT;
return true;
-
+
case SDL_ACTIVEEVENT:
if (ev.active.state & SDL_APPMOUSEFOCUS)
debug(2, "%s mouse focus.", ev.active.gain ? "Got" : "Lost");
diff --git a/backends/platform/x11/x11.cpp b/backends/platform/x11/x11.cpp
index 3acc40e861..3c809c8c06 100644
--- a/backends/platform/x11/x11.cpp
+++ b/backends/platform/x11/x11.cpp
@@ -212,7 +212,7 @@ out_of_loop:
/* And finally start the local timer */
gettimeofday(&_start_time, NULL);
-
+
OSystem::initBackend();
}
@@ -390,7 +390,7 @@ void OSystem_X11::initSize(uint w, uint h) {
if (_local_fb)
free(_local_fb);
if (_local_fb_overlay)
- free(_local_fb_overlay);
+ free(_local_fb_overlay);
/* Initialize the 'local' frame buffer and the palette */
_local_fb = (uint8 *)calloc(_fb_width * _fb_height, sizeof(uint8));
_local_fb_overlay = (uint16 *)calloc(_fb_width * _fb_height, sizeof(uint16));
@@ -541,7 +541,7 @@ void OSystem_X11::updateScreen_helper(const DirtyRect *d, DirtyRect *dout) {
currLine = y * _fb_width;
for (x = d->x; x < d->x + d->w; x++) {
currPixel = _local_fb_overlay[(currLine + x)];
- *(uint32 *)ptr_dst = ((currPixel & 0xF800) << 8) + ((currPixel & 0x07E0) << 5) +
+ *(uint32 *)ptr_dst = ((currPixel & 0xF800) << 8) + ((currPixel & 0x07E0) << 5) +
((currPixel & 0x001F) << 3);
ptr_dst += sizeof(uint32);
}
diff --git a/backends/plugins/dc/dc-provider.cpp b/backends/plugins/dc/dc-provider.cpp
index db0242f7d8..00471b790d 100644
--- a/backends/plugins/dc/dc-provider.cpp
+++ b/backends/plugins/dc/dc-provider.cpp
@@ -44,7 +44,7 @@ protected:
void *func = dlsym(_dlHandle, symbol);
if (!func)
warning("Failed loading symbol '%s' from plugin '%s' (%s)", symbol, _filename.c_str(), dlerror());
-
+
// FIXME HACK: This is a HACK to circumvent a clash between the ISO C++
// standard and POSIX: ISO C++ disallows casting between function pointers
// and data pointers, but dlsym always returns a void pointer. For details,
@@ -62,14 +62,14 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
_dlHandle = dlopen(_filename.c_str(), RTLD_LAZY);
-
+
if (!_dlHandle) {
warning("Failed loading plugin '%s' (%s)", _filename.c_str(), dlerror());
return false;
}
-
+
bool ret = DynamicPlugin::loadPlugin();
-
+
if (ret)
dlforgetsyms(_dlHandle);
@@ -93,8 +93,8 @@ DCPluginProvider::~DCPluginProvider() {
PluginList DCPluginProvider::getPlugins() {
PluginList pl;
-
-
+
+
// Load dynamic plugins
// TODO... this is right now just a nasty hack.
// This should search one or multiple directories for all plugins it can
@@ -124,8 +124,8 @@ PluginList DCPluginProvider::getPlugins() {
pl.push_back(new DCPlugin(i->getPath()));
}
}
-
-
+
+
return pl;
}
diff --git a/backends/plugins/dynamic-plugin.h b/backends/plugins/dynamic-plugin.h
index a7a8eb5b96..44b379a625 100644
--- a/backends/plugins/dynamic-plugin.h
+++ b/backends/plugins/dynamic-plugin.h
@@ -41,7 +41,7 @@ typedef GameList (*DetectFunc)(const FSList &fslist);
class DynamicPlugin : public Plugin {
protected:
typedef void (*VoidFunc)();
-
+
Common::String _name;
Common::String _copyright;
GameIDQueryFunc _qf;
@@ -82,7 +82,7 @@ public:
return false;
}
_name = nameFunc();
-
+
// Query the plugin's copyright
nameFunc = (NameFunc)findSymbol("PLUGIN_copyright");
if (!nameFunc) {
@@ -90,7 +90,7 @@ public:
return false;
}
_copyright = nameFunc();
-
+
// Query the plugin for the game ids it supports
GameIDListFunc gameListFunc = (GameIDListFunc)findSymbol("PLUGIN_gameIDList");
if (!gameListFunc) {
@@ -98,28 +98,28 @@ public:
return false;
}
_games = gameListFunc();
-
+
// Retrieve the gameid query function
_qf = (GameIDQueryFunc)findSymbol("PLUGIN_findGameID");
if (!_qf) {
unloadPlugin();
return false;
}
-
+
// Retrieve the factory function
_ef = (EngineFactory)findSymbol("PLUGIN_createEngine");
if (!_ef) {
unloadPlugin();
return false;
}
-
+
// Retrieve the detector function
_df = (DetectFunc)findSymbol("PLUGIN_detectGames");
if (!_df) {
unloadPlugin();
return false;
}
-
+
return true;
}
};
diff --git a/backends/plugins/posix/posix-provider.cpp b/backends/plugins/posix/posix-provider.cpp
index 03ee1c204f..6ee7f5c241 100644
--- a/backends/plugins/posix/posix-provider.cpp
+++ b/backends/plugins/posix/posix-provider.cpp
@@ -42,7 +42,7 @@ protected:
void *func = dlsym(_dlHandle, symbol);
if (!func)
warning("Failed loading symbol '%s' from plugin '%s' (%s)", symbol, _filename.c_str(), dlerror());
-
+
// FIXME HACK: This is a HACK to circumvent a clash between the ISO C++
// standard and POSIX: ISO C++ disallows casting between function pointers
// and data pointers, but dlsym always returns a void pointer. For details,
@@ -60,12 +60,12 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
_dlHandle = dlopen(_filename.c_str(), RTLD_LAZY);
-
+
if (!_dlHandle) {
warning("Failed loading plugin '%s' (%s)", _filename.c_str(), dlerror());
return false;
}
-
+
return DynamicPlugin::loadPlugin();
}
void unloadPlugin() {
@@ -86,8 +86,8 @@ POSIXPluginProvider::~POSIXPluginProvider() {
PluginList POSIXPluginProvider::getPlugins() {
PluginList pl;
-
-
+
+
// Load dynamic plugins
// TODO... this is right now just a nasty hack.
// This should search one or multiple directories for all plugins it can
@@ -117,8 +117,8 @@ PluginList POSIXPluginProvider::getPlugins() {
pl.push_back(new POSIXPlugin(i->getPath()));
}
}
-
-
+
+
return pl;
}
diff --git a/backends/plugins/sdl/sdl-provider.cpp b/backends/plugins/sdl/sdl-provider.cpp
index cb09af20ca..fd06f23e14 100644
--- a/backends/plugins/sdl/sdl-provider.cpp
+++ b/backends/plugins/sdl/sdl-provider.cpp
@@ -43,7 +43,7 @@ protected:
void *func = SDL_LoadFunction(_dlHandle, symbol);
if (!func)
warning("Failed loading symbol '%s' from plugin '%s' (%s)", symbol, _filename.c_str(), SDL_GetError());
-
+
// FIXME HACK: This is a HACK to circumvent a clash between the ISO C++
// standard and POSIX: ISO C++ disallows casting between function pointers
// and data pointers, but dlsym always returns a void pointer. For details,
@@ -61,12 +61,12 @@ public:
bool loadPlugin() {
assert(!_dlHandle);
_dlHandle = SDL_LoadObject(_filename.c_str());
-
+
if (!_dlHandle) {
warning("Failed loading plugin '%s' (%s)", _filename.c_str(), SDL_GetError());
return false;
}
-
+
return DynamicPlugin::loadPlugin();
}
void unloadPlugin() {
@@ -86,8 +86,8 @@ SDLPluginProvider::~SDLPluginProvider() {
PluginList SDLPluginProvider::getPlugins() {
PluginList pl;
-
-
+
+
// Load dynamic plugins
// TODO... this is right now just a nasty hack.
// This should search one or multiple directories for all plugins it can
@@ -117,8 +117,8 @@ PluginList SDLPluginProvider::getPlugins() {
pl.push_back(new SDLPlugin(i->getPath()));
}
}
-
-
+
+
return pl;
}
diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp
index e20256cd82..170ce15e3e 100644
--- a/backends/plugins/win32/win32-provider.cpp
+++ b/backends/plugins/win32/win32-provider.cpp
@@ -61,7 +61,7 @@ protected:
#endif
if (!func)
debug("Failed loading symbol '%s' from plugin '%s'", symbol, _filename.c_str());
-
+
// FIXME HACK: This is a HACK to circumvent a clash between the ISO C++
// standard and POSIX: ISO C++ disallows casting between function pointers
// and data pointers, but dlsym always returns a void pointer. For details,
@@ -84,7 +84,7 @@ public:
if (!_filename.hasSuffix("scummvm.dll")) // skip loading the core scummvm module
_dlHandle = LoadLibrary(toUnicode(_filename.c_str()));
#endif
-
+
if (!_dlHandle) {
debug("Failed loading plugin '%s' (error code %d)", _filename.c_str(), (int32) GetLastError());
return false;
@@ -114,8 +114,8 @@ Win32PluginProvider::~Win32PluginProvider() {
PluginList Win32PluginProvider::getPlugins() {
PluginList pl;
-
-
+
+
// Load dynamic plugins
// TODO... this is right now just a nasty hack.
// This should search one or multiple directories for all plugins it can
@@ -145,8 +145,8 @@ PluginList Win32PluginProvider::getPlugins() {
pl.push_back(new Win32Plugin(i->getPath()));
}
}
-
-
+
+
return pl;
}
diff --git a/backends/saves/default/default-saves.cpp b/backends/saves/default/default-saves.cpp
index 4312f08fcc..ec6d6842c0 100644
--- a/backends/saves/default/default-saves.cpp
+++ b/backends/saves/default/default-saves.cpp
@@ -204,16 +204,16 @@ Common::InSaveFile *DefaultSaveFileManager::openForLoading(const char *filename)
char buf[256];
Common::String savePath = getSavePath();
checkPath(savePath);
-
+
if (getError() == SFM_NO_ERROR) {
join_paths(filename, savePath.c_str(), buf, sizeof(buf));
StdioSaveFile *sf = new StdioSaveFile(buf, false);
-
+
if (!sf->isOpen()) {
delete sf;
sf = 0;
}
-
+
return wrapInSaveFile(sf);
} else {
return 0;
@@ -229,12 +229,12 @@ Common::OutSaveFile *DefaultSaveFileManager::openForSaving(const char *filename)
if (getError() == SFM_NO_ERROR) {
join_paths(filename, savePath.c_str(), buf, sizeof(buf));
StdioSaveFile *sf = new StdioSaveFile(buf, true);
-
+
if (!sf->isOpen()) {
delete sf;
sf = 0;
}
-
+
return wrapOutSaveFile(sf);
} else {
return 0;
@@ -246,12 +246,12 @@ bool DefaultSaveFileManager::removeSavefile(const char *filename) {
clearError();
Common::String filenameStr;
join_paths(filename, getSavePath().c_str(), buf, sizeof(buf));
-
+
if (remove(buf) != 0) {
#ifndef _WIN32_WCE
if (errno == EACCES)
setError(SFM_DIR_ACCESS, "Search or write permission denied: "+filenameStr);
-
+
if (errno == ENOENT)
setError(SFM_DIR_NOENT, "A component of the path does not exist, or the path is an empty string: "+filenameStr);
#endif
diff --git a/backends/saves/default/default-saves.h b/backends/saves/default/default-saves.h
index f1a0d04aef..f3e0ec5b35 100644
--- a/backends/saves/default/default-saves.h
+++ b/backends/saves/default/default-saves.h
@@ -46,7 +46,7 @@ protected:
* might implement savefiles in a completely different way.
*/
virtual Common::String getSavePath() const;
-
+
/**
* Checks the given path for read access, existence, etc.
* Sets the internal error and error message accordingly.
diff --git a/backends/saves/savefile.cpp b/backends/saves/savefile.cpp
index 31caf275d7..98a3d6b449 100644
--- a/backends/saves/savefile.cpp
+++ b/backends/saves/savefile.cpp
@@ -74,7 +74,7 @@ bool SaveFileManager::renameSavefile(const char *oldFilename, const char *newFil
String SaveFileManager::popErrorDesc() {
String err = _errorDesc;
clearError();
-
+
return err;
}
diff --git a/backends/timer/default/default-timer.h b/backends/timer/default/default-timer.h
index 2a999c6e0f..3dbb89e24a 100644
--- a/backends/timer/default/default-timer.h
+++ b/backends/timer/default/default-timer.h
@@ -31,13 +31,13 @@
class OSystem;
struct TimerSlot;
-
+
class DefaultTimerManager : public Common::TimerManager {
private:
Common::Mutex _mutex;
void *_timerHandler;
TimerSlot *_head;
-
+
public:
DefaultTimerManager();
diff --git a/base/module.mk b/base/module.mk
index 9a9312fa73..dd89c5fb2d 100644
--- a/base/module.mk
+++ b/base/module.mk
@@ -7,5 +7,5 @@ MODULE_OBJS := \
plugins.o \
version.o
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index 59fd27bc0a..ef2a01bba6 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -138,7 +138,7 @@ void ConfigManager::loadDefaultConfigFile() {
#elif defined(PALMOS_MODE)
strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE);
#elif defined(IPHONE)
- strcpy(configFile,"/var/root/" DEFAULT_CONFIG_FILE);
+ strcpy(configFile,"/var/root/" DEFAULT_CONFIG_FILE);
#elif defined(__PLAYSTATION2__)
((OSystem_PS2*)g_system)->makeConfigPath(configFile);
#elif defined(__PSP__)
diff --git a/common/config-manager.h b/common/config-manager.h
index 79f56c5bca..bebb59b539 100644
--- a/common/config-manager.h
+++ b/common/config-manager.h
@@ -77,7 +77,7 @@ public:
#else
static const char *kApplicationDomain;
static const char *kTransientDomain;
-
+
const String _emptyString;
#endif
@@ -97,7 +97,7 @@ public:
// Generic access methods: No domain specified, use the values from the
// various domains in the order of their priority.
//
-
+
bool hasKey(const String &key) const;
const String & get(const String &key) const;
void set(const String &key, const String &value);
@@ -143,7 +143,7 @@ public:
void renameGameDomain(const String &oldName, const String &newName);
bool hasGameDomain(const String &domName) const;
const DomainMap & getGameDomains() const { return _gameDomains; }
-
+
/*
TODO: Callback/change notification system
typedef void (*ConfigCallback)(const ConstString &key, void *refCon);
diff --git a/common/endian.h b/common/endian.h
index 685af27a17..c889371a2f 100644
--- a/common/endian.h
+++ b/common/endian.h
@@ -58,7 +58,7 @@ FORCEINLINE uint16 SWAP_BYTES_16(uint16 a) {
*
* Why is this necessary? The C/C++ standard does not define the endianess to
* be used for character constants. Hence if one uses multi-byte character
- * constants, a potential portability problem opens up.
+ * constants, a potential portability problem opens up.
*
* Fortunately, a semi-standard has been established: On almost all systems
* and compilers, multi-byte character constants are encoded using the big
diff --git a/common/events.h b/common/events.h
index d4b8134bc6..6e6485f184 100644
--- a/common/events.h
+++ b/common/events.h
@@ -129,7 +129,7 @@ class EventManager : NonCopyable {
public:
EventManager() {}
virtual ~EventManager() {}
-
+
enum {
LBUTTON = 1 << 0,
RBUTTON = 1 << 1
@@ -144,19 +144,19 @@ public:
/** Register random source so it can be serialized in game test purposes **/
virtual void registerRandomSource(Common::RandomSource &rnd, const char *name) = 0;
-
+
virtual void processMillis(uint32 &millis) = 0;
-
+
/** Return the current key state */
virtual Common::Point getMousePos() const = 0;
-
+
/**
* Return a bitmask with the button states:
* - bit 0: left button up=1, down=0
* - bit 1: right button up=1, down=0
*/
virtual int getButtonState() const = 0;
-
+
/** Get a bitmask with the current modifier state */
virtual int getModifierState() const = 0;
@@ -165,12 +165,12 @@ public:
* received an EVENT_QUIT.
*/
virtual int shouldQuit() const = 0;
-
+
// Optional: check whether a given key is currently pressed ????
//virtual bool isKeyPressed(int keycode) = 0;
// TODO: Keyboard repeat support?
-
+
// TODO: Consider removing OSystem::getScreenChangeID and
// replacing it by a generic getScreenChangeID method here
};
diff --git a/common/file.cpp b/common/file.cpp
index 3f0c13ba39..3ddd3d2cc5 100644
--- a/common/file.cpp
+++ b/common/file.cpp
@@ -66,8 +66,8 @@
// all of these to my own code.
//
// A #define is the only way, as redefinig the functions would cause linker errors.
-
- // These functions need to be #undef'ed, as their original definition
+
+ // These functions need to be #undef'ed, as their original definition
// in devkitarm is done with #includes (ugh!)
#undef feof
#undef clearerr
@@ -75,7 +75,7 @@
//#undef ferror
#include "backends/fs/ds/ds-fs.h"
-
+
//void std_fprintf(FILE* handle, const char* fmt, ...); // used in common/util.cpp
//void std_fflush(FILE* handle); // used in common/util.cpp
@@ -85,7 +85,7 @@
//char* std_getcwd(char* dir, int dunno); // not used
//void std_cwd(char* dir); // not used
//int std_ferror(FILE* handle); // not used
-
+
// Only functions used in the ScummVM source have been defined here!
#define fopen(name, mode) DS::std_fopen(name, mode)
#define fclose(handle) DS::std_fclose(handle)
@@ -111,9 +111,9 @@
#ifdef __SYMBIAN32__
#undef feof
#undef clearerr
-
+
#define FILE void
-
+
FILE* symbian_fopen(const char* name, const char* mode);
void symbian_fclose(FILE* handle);
size_t symbian_fread(const void* ptr, size_t size, size_t numItems, FILE* handle);
@@ -230,7 +230,7 @@ void File::addDefaultDirectoryRecursive(const FilesystemNode &dir, int level, co
FSList fslist;
if (!dir.getChildren(fslist, FilesystemNode::kListAll)) {
- // Failed listing the contents of this node, so it is either not a
+ // Failed listing the contents of this node, so it is either not a
// directory, or just doesn't exist at all.
return;
}
@@ -265,7 +265,7 @@ void File::addDefaultDirectoryRecursive(const FilesystemNode &dir, int level, co
void File::resetDefaultDirectories() {
delete _defaultDirectories;
delete _filesMap;
-
+
_defaultDirectories = 0;
_filesMap = 0;
}
@@ -417,27 +417,27 @@ bool File::exists(const String &filename) {
FilesystemNode file(filename);
if (file.exists())
return !file.isDirectory();
-
+
// See if the file is already mapped
if (_filesMap && _filesMap->contains(filename)) {
FilesystemNode file2((*_filesMap)[filename]);
-
+
if (file2.exists())
return !file2.isDirectory();
}
-
+
// Try all default directories
if (_defaultDirectories) {
StringIntMap::const_iterator i(_defaultDirectories->begin());
for (; i != _defaultDirectories->end(); ++i) {
FilesystemNode file2(i->_key + filename);
-
+
if(file2.exists())
return !file2.isDirectory();
}
}
-
- //Try opening the file inside the local directory as a last resort
+
+ //Try opening the file inside the local directory as a last resort
File tmp;
return tmp.open(filename, kFileReadMode);
}
diff --git a/common/fs.cpp b/common/fs.cpp
index 2a8000378a..1c93d82b2b 100644
--- a/common/fs.cpp
+++ b/common/fs.cpp
@@ -180,7 +180,7 @@ bool FilesystemNode::lookupFile(FSList &results, const Common::String &p, bool h
Common::String pattern = p;
pattern.toUppercase();
-
+
// First match all files on this level
getChildren(children, FilesystemNode::kListAll, hidden);
for (FSList::iterator entry = children.begin(); entry != children.end(); ++entry) {
diff --git a/common/fs.h b/common/fs.h
index 8356f7b441..b287280ca4 100644
--- a/common/fs.h
+++ b/common/fs.h
@@ -62,8 +62,8 @@ class FSList : public Common::Array<FilesystemNode> {};
* paths (MacOS 9 doesn't even have the notion of a "current directory").
* And if we ever want to support devices with no FS in the classical sense (Palm...),
* we can build upon this.
- *
- * This class acts as a wrapper around the AbstractFilesystemNode class defined in backends/fs.
+ *
+ * This class acts as a wrapper around the AbstractFilesystemNode class defined in backends/fs.
*/
class FilesystemNode {
private:
@@ -83,7 +83,7 @@ public:
/**
* Create a new pathless FilesystemNode. Since there's no path associated
- * with this node, path-related operations (i.e. exists(), isDirectory(),
+ * with this node, path-related operations (i.e. exists(), isDirectory(),
* getPath()) will always return false or raise an assertion.
*/
FilesystemNode();
@@ -103,7 +103,7 @@ public:
* Copy constructor.
*/
FilesystemNode(const FilesystemNode &node);
-
+
/**
* Destructor.
*/
@@ -113,7 +113,7 @@ public:
* Copy operator.
*/
FilesystemNode &operator= (const FilesystemNode &node);
-
+
/**
* Compare the name of this node to the name of another. Directories
* go before normal files.
@@ -122,7 +122,7 @@ public:
/**
* Indicates whether the object referred by this path exists in the filesystem or not.
- *
+ *
* @return bool true if the path exists, false otherwise.
*/
virtual bool exists() const;
@@ -133,20 +133,20 @@ public:
* If no child node with the given name exists, an invalid node is returned.
*/
FilesystemNode getChild(const Common::String &name) const;
-
+
/**
* Return a list of child nodes of this directory node. If called on a node
* that does not represent a directory, false is returned.
- *
+ *
* @return true if succesful, false otherwise (e.g. when the directory does not exist).
*/
- virtual bool getChildren(FSList &fslist, ListMode mode = kListDirectoriesOnly, bool hidden = false) const;
+ virtual bool getChildren(FSList &fslist, ListMode mode = kListDirectoriesOnly, bool hidden = false) const;
/**
* Return a human readable string for this node, usable for display (e.g.
* in the GUI code). Do *not* rely on it being usable for anything else,
* like constructing paths!
- *
+ *
* @return the display name
*/
virtual Common::String getDisplayName() const;
@@ -173,7 +173,7 @@ public:
* @return the 'path' represented by this filesystem node
*/
virtual Common::String getPath() const;
-
+
/**
* Get the parent node of this node. If this node has no parent node,
* then it returns a duplicate of this node.
@@ -182,7 +182,7 @@ public:
/**
* Indicates whether the path refers to a directory or not.
- *
+ *
* @todo Currently we assume that a node that is not a directory
* automatically is a file (ignoring things like symlinks or pipes).
* That might actually be OK... but we could still add an isFile method.
@@ -190,29 +190,29 @@ public:
* kDirNodeType, kFileNodeType, kInvalidNodeType.
*/
virtual bool isDirectory() const;
-
+
/**
* Indicates whether the object referred by this path can be read from or not.
- *
- * If the path refers to a directory, readability implies being able to read
+ *
+ * If the path refers to a directory, readability implies being able to read
* and list the directory entries.
- *
- * If the path refers to a file, readability implies being able to read the
+ *
+ * If the path refers to a file, readability implies being able to read the
* contents of the file.
- *
+ *
* @return bool true if the object can be read, false otherwise.
*/
virtual bool isReadable() const;
-
+
/**
* Indicates whether the object referred by this path can be written to or not.
- *
+ *
* If the path refers to a directory, writability implies being able to modify
* the directory entry (i.e. rename the directory, remove it or write files inside of it).
- *
+ *
* If the path refers to a file, writability implies being able to write data
* to the file.
- *
+ *
* @return bool true if the object can be written to, false otherwise.
*/
virtual bool isWritable() const;
@@ -221,16 +221,16 @@ public:
* Searches recursively for files matching the specified pattern inside this directory and
* all its subdirectories. It is safe to call this method for non-directories, in this case
* it will just return false.
- *
+ *
* The files in each directory are scanned first. Other than that, a depth first search
* is performed.
- *
+ *
* @param results List to put the matches in.
* @param pattern Pattern of the files to look for.
* @param hidden Whether to search hidden files or not.
* @param exhaustive Whether to continue searching after one match has been found.
* @param depth How many levels to search through (-1 = search all subdirs, 0 = only the current one)
- *
+ *
* @return true if matches could be found, false otherwise.
*/
virtual bool lookupFile(FSList &results, const Common::String &pattern, bool hidden, bool exhaustive, int depth = -1) const;
diff --git a/common/func.h b/common/func.h
index a424fcf205..c262c149c6 100644
--- a/common/func.h
+++ b/common/func.h
@@ -94,7 +94,7 @@ private:
Result (*_func)(Arg);
public:
typedef Result (*FuncType)(Arg);
-
+
PointerToUnaryFunc(const FuncType &func) : _func(func) {}
Result operator()(Arg v) const {
return _func(v);
diff --git a/common/hashmap.h b/common/hashmap.h
index f78447ace4..ac4295307b 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -173,7 +173,7 @@ public:
* This is almost completely identical to the normal iterator class, only
* with some const keywords added here and there, plus a conversion
* operator which makes it possible to transparently convert iterators to
- * const iterators.
+ * const iterators.
* It is sadly not really possible to reduce this code duplication using
* template, unless one is willing to accept various warnings on certain
* compilers. Note that many (most? all?) implementations of the standard
diff --git a/common/keyboard.h b/common/keyboard.h
index d0d0e43f00..93579cbed6 100644
--- a/common/keyboard.h
+++ b/common/keyboard.h
@@ -170,7 +170,7 @@ enum KeyCode {
KEYCODE_MODE = 313, // "Alt Gr" key
KEYCODE_COMPOSE = 314, // Multi-key compose key
- // Miscellaneous function keys
+ // Miscellaneous function keys
KEYCODE_HELP = 315,
KEYCODE_PRINT = 316,
KEYCODE_SYSREQ = 317,
@@ -248,13 +248,13 @@ struct KeyState {
* @see KBD_CTRL, KBD_ALT, KBD_SHIFT
*/
byte flags;
-
+
KeyState(KeyCode kc = KEYCODE_INVALID, uint16 asc = 0, byte f = 0) {
keycode = kc;
ascii = asc ? asc : (uint16)kc;
flags = f;
}
-
+
void reset() {
keycode = KEYCODE_INVALID;
ascii = flags = 0;
diff --git a/common/list.h b/common/list.h
index 4ece453711..08b964eddf 100644
--- a/common/list.h
+++ b/common/list.h
@@ -31,7 +31,7 @@ namespace Common {
/**
* Simple double linked list, modeled after the list template of the standard
- * C++ library.
+ * C++ library.
*/
template <class t_T>
class List {
@@ -44,11 +44,11 @@ public:
NodeBase *_prev;
NodeBase *_next;
};
-
+
template <class t_T2>
struct Node : public NodeBase {
t_T2 _data;
-
+
Node(const t_T2 &x) : _data(x) {}
};
@@ -101,11 +101,11 @@ public:
t_T2* operator->() const {
return &(operator*());
}
-
+
bool operator==(const Iterator<t_T2>& x) const {
return _node == x._node;
}
-
+
bool operator!=(const Iterator<t_T2>& x) const {
return _node != x._node;
}
@@ -148,7 +148,7 @@ public:
void insert(iterator pos, const t_T& element) {
NodeBase *newNode = new Node<t_T>(element);
-
+
newNode->_next = pos._node;
newNode->_prev = pos._node->_prev;
newNode->_prev->_next = newNode;
@@ -216,7 +216,7 @@ public:
else
erase(i, end());
}
-
+
return *this;
}
@@ -230,8 +230,8 @@ public:
void clear() {
erase(begin(), end());
}
-
- bool empty() const {
+
+ bool empty() const {
return (_anchor == _anchor->_next);
}
diff --git a/common/md5.cpp b/common/md5.cpp
index fee18f25d0..edce9d8e4e 100644
--- a/common/md5.cpp
+++ b/common/md5.cpp
@@ -268,10 +268,10 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length) {
warning("md5_file couldn't open '%s'", name);
return false;
}
-
+
return md5_file(f, digest, length);
}
-
+
bool md5_file(ReadStream &stream, uint8 digest[16], uint32 length) {
diff --git a/common/md5.h b/common/md5.h
index 578c363e8c..e7879dc6df 100644
--- a/common/md5.h
+++ b/common/md5.h
@@ -35,7 +35,7 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length = 0);
bool md5_file(const FilesystemNode &file, uint8 digest[16], uint32 length = 0);
bool md5_file(ReadStream &stream, uint8 digest[16], uint32 length = 0);
-// The following two methods work similar to the above two, but
+// The following two methods work similar to the above two, but
// instead of computing the binary MD5 digest, they produce
// a human readable lowercase hexstring representing the digest.
// The md5str parameter must point to a buffer of 32+1 chars.
diff --git a/common/module.mk b/common/module.mk
index 237753458a..bd3e9f21a0 100644
--- a/common/module.mk
+++ b/common/module.mk
@@ -16,5 +16,5 @@ MODULE_OBJS := \
unzip.o \
zlib.o
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/common/savefile.h b/common/savefile.h
index 5b06248aa8..630765ab4b 100644
--- a/common/savefile.h
+++ b/common/savefile.h
@@ -109,15 +109,15 @@ public:
* @return A string describing the last error.
*/
virtual String getErrorDesc() { return _errorDesc; }
-
+
/**
* Returns the last ocurred error description. If none ocurred, returns 0.
* Also clears the last error state and description.
- *
+ *
* @return A string describing the last error.
*/
virtual String popErrorDesc();
-
+
/**
* Open the file with name filename in the given directory for saving.
* @param filename the filename
diff --git a/common/str.h b/common/str.h
index 55ff94c51c..f19ad4e606 100644
--- a/common/str.h
+++ b/common/str.h
@@ -34,7 +34,7 @@ namespace Common {
* Simple string class for ScummVM. Provides automatic storage managment,
* and overloads several operators in a 'natural' fashion, mimicking
* the std::string class. Even provides simple iterators.
- *
+ *
* This class tries to avoid allocating lots of small blocks on the heap,
* since that is inefficient on several platforms supported by ScummVM.
* Instead, small strings are stored 'inside' the string object (i.e. on
@@ -62,14 +62,14 @@ protected:
* on purpose :-).
*/
uint32 _len;
-
+
/**
* Pointer to the actual string storage. Either points to _storage,
* or to a block allocated on the heap via malloc.
*/
char *_str;
-
-
+
+
union {
/**
* Internal string storage.
@@ -84,11 +84,11 @@ protected:
uint32 _capacity;
} _extern;
};
-
+
inline bool isStorageIntern() const {
return _str == _storage;
}
-
+
public:
#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__))
static const String emptyString;
@@ -131,7 +131,7 @@ public:
bool hasSuffix(const char *x) const;
bool hasPrefix(const char *x) const;
-
+
bool contains(const char *x) const;
inline const char *c_str() const { return _str; }
diff --git a/common/system.h b/common/system.h
index 70e814e9e5..44726fe05c 100644
--- a/common/system.h
+++ b/common/system.h
@@ -164,7 +164,7 @@ public:
* phone-like keypad temporarily unmap all user actions which leads to
* comfortable word entry. Conversely, when the dialog exits the feature
* is set to false.
- * TODO: Fingolfin suggests that the way the feature is used can be
+ * TODO: Fingolfin suggests that the way the feature is used can be
* generalized in this sense: Have a keyboard mapping feature, which the
* engine queries for to assign keys to actions ("Here's my default key
* map for these actions, what do you want them set to?").
@@ -511,11 +511,11 @@ public:
* @note This is currently used in the SCUMM, QUEEN and KYRA engines.
*/
virtual void setShakePos(int shakeOffset) = 0;
-
+
/**
* Sets the area of the screen that has the focus. For example, when a character
* is speaking, they will have the focus. Allows for pan-and-scan style views
- * where the backend could follow the speaking character or area of interest on
+ * where the backend could follow the speaking character or area of interest on
* the screen.
*
* The backend is responsible for clipping the rectangle and deciding how best to
@@ -523,9 +523,9 @@ public:
*
* @param rect A rectangle on the screen to be focused on
* @see clearFocusRectangle
- */
+ */
virtual void setFocusRectangle(const Common::Rect& rect) {}
-
+
/**
* Clears the focus set by a call to setFocusRectangle(). This allows the engine
* to clear the focus during times when no particular area of the screen has the
@@ -724,7 +724,7 @@ public:
/** Delay/sleep for the specified amount of milliseconds. */
virtual void delayMillis(uint msecs) = 0;
-
+
/** Get the current time and date. Correspond to time()+localtime(). */
virtual void getTimeAndDate(struct tm &t) const;
@@ -904,7 +904,7 @@ public:
/**
* Return String which is used for backend-specific addition to theme
* config.
- *
+ *
* Typical usage is to disable unneeded GUI widgets or defining
* theme-specific tab.
*/
diff --git a/common/util.h b/common/util.h
index e7abd19544..979f98bf4c 100644
--- a/common/util.h
+++ b/common/util.h
@@ -55,21 +55,21 @@ namespace Common {
/**
* Simple DOS-style pattern matching function (understands * and ? like used in DOS).
* Taken from exult/files/listfiles.cc
- *
+ *
* Token meaning:
* "*": any character, any amount of times.
* "?": any character, only once.
- *
+ *
* Example strings/patterns:
* String: monkey.s?? Pattern: monkey.s01 => true
* String: monkey.s?? Pattern: monkey.s101 => false
* String: monkey.s?1 Pattern: monkey.s99 => false
* String: monkey.s* Pattern: monkey.s101 => true
* String: monkey.s*1 Pattern: monkey.s99 => false
- *
+ *
* @param str Text to be matched against the given pattern.
* @param pat Glob pattern.
- *
+ *
* @return true if str matches the pattern, false otherwise.
*/
bool matchString(const char *str, const char *pat);
@@ -94,7 +94,7 @@ private:
public:
RandomSource();
void setSeed(uint32 seed);
-
+
uint32 getSeed() {
return _randSeed;
}
diff --git a/configure b/configure
index 68614432e1..81af7d1694 100755
--- a/configure
+++ b/configure
@@ -229,7 +229,7 @@ find_sdlconfig()
echo_n "Looking for sdl-config... "
sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config"
_sdlconfig=
-
+
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR"
for path_dir in $_sdlpath; do
#reset separator to parse sdlconfigs
@@ -243,9 +243,9 @@ find_sdlconfig()
fi
done
done
-
+
IFS="$ac_save_ifs"
-
+
if test -z "$_sdlconfig"; then
echo "none found!"
exit 1
@@ -255,8 +255,8 @@ find_sdlconfig()
#
# Function to provide echo -n for bourne shells that don't have it
#
-echo_n()
-{
+echo_n()
+{
printf "$@"
}
@@ -297,7 +297,7 @@ CheckNASM()
fi
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$SEPARATOR
-
+
for path_dir in $_nasmpath; do
if test -x "$path_dir/nasm" ; then
NASM="$path_dir/nasm"
@@ -305,7 +305,7 @@ CheckNASM()
break
fi
done
-
+
IFS="$ac_save_ifs"
if test x$NASM = x -o x$NASM = x'"$NASM"'; then
@@ -766,7 +766,7 @@ arm-riscos)
;;
gp2x-linux)
EXEEXT=".gp2x"
- ;;
+ ;;
*)
EXEEXT=""
;;
@@ -838,7 +838,7 @@ case $cxx_version in
cxx_verc_fail=no
;;
# whacky beos version strings
- 2.9-beos-991026*|2.9-beos-000224*)
+ 2.9-beos-991026*|2.9-beos-000224*)
_cxx_major=2
_cxx_minor=95
cxx_version="$cxx_version, ok"
@@ -863,7 +863,7 @@ if test "$cxx_verc_fail" = yes ; then
echo
echo "The version of your compiler is not supported at this time"
echo "Please ensure you are using GCC >= 2.95"
- exit 1
+ exit 1
fi
#
@@ -927,19 +927,19 @@ type_1_byte=`find_type_with_size 1`
TMP="$?"
echo "$type_1_byte"
test $TMP -eq 0 || exit 1 # check exit code of subshell
-
+
echo_n "Type with 2 bytes... "
type_2_byte=`find_type_with_size 2`
TMP="$?"
echo "$type_2_byte"
test $TMP -eq 0 || exit 1 # check exit code of subshell
-
+
echo_n "Type with 4 bytes... "
type_4_byte=`find_type_with_size 4`
TMP="$?"
echo "$type_4_byte"
test $TMP -eq 0 || exit 1 # check exit code of subshell
-
+
#
# Check whether we can use x86 asm routines
#
@@ -1044,7 +1044,7 @@ if test -n "$_host"; then
_backend="gp2x"
_mak_hq_scalers='DISABLE_HQ_SCALERS = 1'
_build_hq_scalers="no"
- ;;
+ ;;
ppc-amigaos)
echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes"
_endian=big
@@ -1099,7 +1099,7 @@ if test -n "$_host"; then
echo "Continuing with auto-detected values ... if you have problems, please add your target to configure."
;;
esac
-
+
else
#
# Check whether memory alignment is required
@@ -1224,7 +1224,7 @@ _def_plugin='
'
_mak_plugins='
BUILD_PLUGINS := 1
-PLUGIN_PREFIX :=
+PLUGIN_PREFIX :=
PLUGIN_SUFFIX := .plugin
PLUGIN_EXTRA_DEPS = $(EXECUTABLE)
CXXFLAGS += -DDYNAMIC_MODULES
diff --git a/dists/debian/changelog b/dists/debian/changelog
index 2e653c8e33..dd2416e9d7 100644
--- a/dists/debian/changelog
+++ b/dists/debian/changelog
@@ -9,7 +9,7 @@ scummvm (0.10.0-0svn20070530) experimental; urgency=low
system, use the ScummVM team's own bug tracker instead. You can find this
tracker at <http://sourceforge.net/tracker/?group_id=37116>.
- -- Tore Anderson <tore@debian.org> Wed, 30 May 2007 11:54:05 +0200
+ -- Tore Anderson <tore@debian.org> Wed, 30 May 2007 11:54:05 +0200
scummvm (0.7.1-1) unstable; urgency=low
@@ -180,7 +180,7 @@ scummvm (0.5.0-1) unstable; urgency=low
* Restructure 00buildopts somewhat, to ease future maintenance.
* Standards-Version 3.6.0, no changes required.
* Revised the description.
- * Sponsored by Joey Hess. (Tore fed me all the beer I could take ..
+ * Sponsored by Joey Hess. (Tore fed me all the beer I could take ..
and then asked me to do this. ;-)
-- Tore Anderson <tore@linpro.no> Fri, 1 Aug 2003 21:45:06 +0200
diff --git a/dists/debian/prepare b/dists/debian/prepare
index 0f86ca742b..078426101b 100755
--- a/dists/debian/prepare
+++ b/dists/debian/prepare
@@ -28,7 +28,7 @@ scummvm ($VERSION) experimental; urgency=low
system, use the ScummVM team's own bug tracker instead. You can find this
tracker at <http://sourceforge.net/tracker/?group_id=37116>.
- -- Tore Anderson <tore@debian.org> $DATE
+ -- Tore Anderson <tore@debian.org> $DATE
__eof
diff --git a/dists/redhat/README b/dists/redhat/README
index 4e6efa74c1..9c1cccf6df 100644
--- a/dists/redhat/README
+++ b/dists/redhat/README
@@ -8,7 +8,7 @@ adapt the below instructions where necessary.
1) Collect sources:
-Place scummvm-%{version}.tar.bz2, libmad-0.15.1b.tar.bz2 and
+Place scummvm-%{version}.tar.bz2, libmad-0.15.1b.tar.bz2 and
mpeg2dec-0.4.0b.tar.bz2 in /usr/src/redhat/SOURCES .
If you have different versions of mpeg2dec or libmad, put the correct version
numbers in the .spec file.
diff --git a/dists/redhat/scummvm-tools.spec b/dists/redhat/scummvm-tools.spec
index 199d40c36f..5ca5fe9cf8 100644
--- a/dists/redhat/scummvm-tools.spec
+++ b/dists/redhat/scummvm-tools.spec
@@ -46,7 +46,7 @@ install -m644 -D convert_dxa.sh %{buildroot}%{_datadir}/scummvm-tools/convert_dx
rm -Rf ${RPM_BUILD_ROOT}
#------------------------------------------------------------------------------
-# Files listing.
+# Files listing.
#------------------------------------------------------------------------------
%files
%doc README COPYING
diff --git a/dists/redhat/scummvm.spec b/dists/redhat/scummvm.spec
index 73686956c2..efde789ce3 100644
--- a/dists/redhat/scummvm.spec
+++ b/dists/redhat/scummvm.spec
@@ -33,9 +33,9 @@ BuildRequires: SDL-devel >= 1.2.2
#------------------------------------------------------------------------------
%description
ScummVM is an interpreter that will play graphic adventure games written for
-LucasArts' SCUMM virtual machine (such as Day of the Tentacle and
-Monkey Island), Sierra's AGI adventures (such as early King's Quest and
-Space Quest games), Adventure Soft's Simon the Sorcerer 1, 2 and Feeble Files,
+LucasArts' SCUMM virtual machine (such as Day of the Tentacle and
+Monkey Island), Sierra's AGI adventures (such as early King's Quest and
+Space Quest games), Adventure Soft's Simon the Sorcerer 1, 2 and Feeble Files,
Revolution Software's Beneath a Steel Sky and Broken Sword 1 and 2,
Interactive Binary Illusions' Flight of the Amazon Queen,
Coktel Vision's Gobliiins, Wyrmkeep's Inherit the Earth, Westwood's
@@ -71,7 +71,7 @@ desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/application
rm -Rf ${RPM_BUILD_ROOT}
#------------------------------------------------------------------------------
-# Files listing.
+# Files listing.
#------------------------------------------------------------------------------
%files
%defattr(0644,root,root,0755)
diff --git a/dists/redhat/scummvm.spec.in b/dists/redhat/scummvm.spec.in
index 83e601f9f2..a20777003b 100644
--- a/dists/redhat/scummvm.spec.in
+++ b/dists/redhat/scummvm.spec.in
@@ -33,9 +33,9 @@ BuildRequires: SDL-devel >= 1.2.2
#------------------------------------------------------------------------------
%description
ScummVM is an interpreter that will play graphic adventure games written for
-LucasArts' SCUMM virtual machine (such as Day of the Tentacle and
-Monkey Island), Sierra's AGI adventures (such as early King's Quest and
-Space Quest games), Adventure Soft's Simon the Sorcerer 1, 2 and Feeble Files,
+LucasArts' SCUMM virtual machine (such as Day of the Tentacle and
+Monkey Island), Sierra's AGI adventures (such as early King's Quest and
+Space Quest games), Adventure Soft's Simon the Sorcerer 1, 2 and Feeble Files,
Revolution Software's Beneath a Steel Sky and Broken Sword 1 and 2,
Interactive Binary Illusions' Flight of the Amazon Queen,
Coktel Vision's Gobliiins, Wyrmkeep's Inherit the Earth, Westwood's
@@ -71,7 +71,7 @@ desktop-file-install --vendor scummvm --dir=%{buildroot}/%{_datadir}/application
rm -Rf ${RPM_BUILD_ROOT}
#------------------------------------------------------------------------------
-# Files listing.
+# Files listing.
#------------------------------------------------------------------------------
%files
%defattr(0644,root,root,0755)
diff --git a/dists/scummvm.6 b/dists/scummvm.6
index d106841657..1859dc119a 100644
--- a/dists/scummvm.6
+++ b/dists/scummvm.6
@@ -7,7 +7,7 @@
.Nd graphic adventure game interpreter
.Sh SYNOPSIS
.Nm scummvm
-.Op Ar options
+.Op Ar options
.Op Ar game
.Sh DESCRIPTION
.Nm
@@ -16,7 +16,7 @@ based an a variety of game engines.
.Bl -tag -width Ds
.It Fl F
Force windowed mode.
-.It Fl b Ar param
+.It Fl b Ar param
Pass number to the boot script (boot param).
.It Fl c Ar config
Use
@@ -59,7 +59,7 @@ Windows built in MIDI sequencer for Windows users
.It Fl f
Force full-screen mode.
.It Fl g Ar scaler
-Select graphics
+Select graphics
.Ar scaler :
.Bl -tag -width Ds
.It Em 2x
@@ -201,7 +201,7 @@ Set music tempo to
.It Cmd-q
Quit (Mac OS X)
.It Ctrl-q
-Quit (Most platforms)
+Quit (Most platforms)
.It Ctrl-f
Toggle fast mode
.It Ctrl-m
@@ -261,6 +261,6 @@ More information can be found in the README and on the website
.Sh AUTHORS
This manual page written by Jonathan Gray <khalek at scummvm.org>.
ScummVM was written by the ScummVM team.
-See
+See
.Pa http://www.scummvm.org
for more information.
diff --git a/dists/slackware/scummvm.SlackBuild b/dists/slackware/scummvm.SlackBuild
index 503b50ddc7..415ee4c867 100755
--- a/dists/slackware/scummvm.SlackBuild
+++ b/dists/slackware/scummvm.SlackBuild
@@ -13,10 +13,10 @@ ARCH=i486
BUILD=1
if [ ! -d $TMP ]; then
- mkdir -p $TMP
+ mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
- mkdir -p $PKG
+ mkdir -p $PKG
fi
cd $TMP
diff --git a/dists/slackware/scummvm.SlackBuild.in b/dists/slackware/scummvm.SlackBuild.in
index 84ac94d7e9..8e20020a4d 100755
--- a/dists/slackware/scummvm.SlackBuild.in
+++ b/dists/slackware/scummvm.SlackBuild.in
@@ -13,10 +13,10 @@ ARCH=i486
BUILD=1
if [ ! -d $TMP ]; then
- mkdir -p $TMP
+ mkdir -p $TMP
fi
if [ ! -d $PKG ]; then
- mkdir -p $PKG
+ mkdir -p $PKG
fi
cd $TMP
diff --git a/dists/slackware/slack-desc b/dists/slackware/slack-desc
index 208e0d4ed4..79917adcf6 100644
--- a/dists/slackware/slack-desc
+++ b/dists/slackware/slack-desc
@@ -7,13 +7,13 @@
|-----handy-ruler------------------------------------------------------|
scummvm: ScummVM
-scummvm:
-scummvm: ScummVM is a collection of interpreters, capable of emulating
+scummvm:
+scummvm: ScummVM is a collection of interpreters, capable of emulating
scummvm: several adventure game engines. ScummVM mainly supports engines
scummvm: created using SCUMM (Script Creation Utility for Maniac Mansion),
-scummvm: used in various LucasArts games such as Monkey Island, Day of the
+scummvm: used in various LucasArts games such as Monkey Island, Day of the
scummvm: Tentacle, and others. ScummVM also contains interpreters for several
scummvm: non-SCUMM games, currently these are Beneath a Steel Sky, Broken
scummvm: Sword I & II and Simon the Sorcerer 1 & 2.
-scummvm:
+scummvm:
scummvm:
diff --git a/engines/agi/agi.cpp b/engines/agi/agi.cpp
index 59beb087f2..f0c3f62e30 100644
--- a/engines/agi/agi.cpp
+++ b/engines/agi/agi.cpp
@@ -235,7 +235,7 @@ void AgiEngine::processEvents() {
// When used with a debug CRT library, isalpha will display a CRT assert
// if passed a parameter that isn't EOF or in the range of 0 through 0xFF.
if (key >= 0 && key <= 0xFF && isalpha(key)) {
- // Key is A-Z.
+ // Key is A-Z.
// Map Ctrl-A to 1, Ctrl-B to 2, etc.
if (event.kbd.flags & Common::KBD_CTRL) {
key = toupper(key) - 'A' + 1;
diff --git a/engines/agi/menu.h b/engines/agi/menu.h
index 0196c75583..d27dfa497d 100644
--- a/engines/agi/menu.h
+++ b/engines/agi/menu.h
@@ -81,7 +81,7 @@ private:
void drawMenuOptionHilite(int hMenu, int vMenu);
void newMenuSelected(int i);
bool mouseOverText(unsigned int line, unsigned int col, char *s);
-
+
};
} // End of namespace Agi
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index faf46f5a93..6944eee9f2 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -676,7 +676,7 @@ void Mickey::drawObj(ENUM_MSA_OBJECT iObj, int x0, int y0) {
if (iObj == IDI_MSA_OBJECT_CRYSTAL)
_vm->_picture->setPictureFlags(kPicFStep);
-
+
_vm->_picture->setOffset(x0, y0);
_vm->_picture->decodePicture(buffer, size, false, IDI_MSA_PIC_WIDTH, IDI_MSA_PIC_HEIGHT);
_vm->_picture->setOffset(0, 0);
@@ -892,7 +892,7 @@ void Mickey::drawLogo() {
}
_vm->_picture->showPic(10, 10, w, h);
-
+
delete [] buffer;
}
diff --git a/engines/agi/preagi_mickey.h b/engines/agi/preagi_mickey.h
index 5e421d24ac..8d982dc401 100644
--- a/engines/agi/preagi_mickey.h
+++ b/engines/agi/preagi_mickey.h
@@ -43,7 +43,7 @@ namespace Agi {
#define IDS_MSA_CRYSTALS "%s CRYSTALS"
const char IDS_MSA_CRYSTAL_NO[][3] = {
- "NO", " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9"
+ "NO", " 1", " 2", " 3", " 4", " 5", " 6", " 7", " 8", " 9"
};
const char IDS_MSA_TEMP_C[][5] = {
" 20 ", " 480", "-200", " 430", "-185", "-230", "-130", "-150", "-215"
@@ -52,7 +52,7 @@ const char IDS_MSA_TEMP_F[][5] = {
" 68 ", " 897", "-328", " 807", "-301", "-382", "-202", "-238", "-355"
};
const char IDS_MSA_PLANETS[][10] = {
- "EARTH. ", "VENUS. ", "TRITON. ", "MERCURY.", "TITAN. ",
+ "EARTH. ", "VENUS. ", "TRITON. ", "MERCURY.", "TITAN. ",
"PLUTO. ", "IO. ", "MARS. ", "OBERON. "
};
@@ -111,7 +111,7 @@ const char IDS_MSA_INSERT_DISK[][40] = {
#define IDI_MSA_MSG_STAR_MAP_2 48
#define IDI_MSA_MSG_SPACESUIT_WEAR 11
#define IDI_MSA_MSG_SPACESUIT_REMOVE 13
-#define IDI_MSA_MSG_SPACESUIT_0 3
+#define IDI_MSA_MSG_SPACESUIT_0 3
#define IDI_MSA_MSG_SPACESUIT_CANT_WEAR_ON_EARTH 12
#define IDI_MSA_MSG_SHIP_LAUNCH 16
#define IDI_MSA_MSG_SHIP_LAND 22
@@ -387,7 +387,7 @@ const char IDS_MSA_NAME_DAT[][13] = {
};
const char IDS_MSA_NAME_PLANET[][10] = {
- "EARTH", "VENUS", "TRITON", "MERCURY", "TITAN",
+ "EARTH", "VENUS", "TRITON", "MERCURY", "TITAN",
"PLUTO", "IO", "MARS", "OBERON"
};
@@ -397,7 +397,7 @@ const char IDS_MSA_NAME_PLANET_2[][10] = {
};
const char IDS_MSA_ADDR_PLANET[][7] = {
- "OB", "B", "OOBBB", "O", "OOBB",
+ "OB", "B", "OOBBB", "O", "OOBB",
"OOOBBB", "OBB", "OOB", "OOOBB"
};
@@ -429,7 +429,7 @@ enum ENUM_MSA_ITEM {
};
const char IDS_MSA_NAME_ITEM[][15] = {
- "A FLASHLIGHT", "A ROPE ", "A BONE ", "A LETTER", "A CROWBAR", "A WRENCH",
+ "A FLASHLIGHT", "A ROPE ", "A BONE ", "A LETTER", "A CROWBAR", "A WRENCH",
"A MATTRESS", "A SCARF", "SUNGLASSES", "A SCALE ", "A ROCK "
};
diff --git a/engines/agi/preagi_troll.cpp b/engines/agi/preagi_troll.cpp
index 89dfe23781..d4ec193376 100644
--- a/engines/agi/preagi_troll.cpp
+++ b/engines/agi/preagi_troll.cpp
@@ -55,7 +55,7 @@ void Troll::drawMenu(const char *szMenu, int iSel) {
bool Troll::getMenuSel(const char *szMenu, int *iSel, int nSel) {
Common::Event event;
int y;
-
+
drawMenu(szMenu, *iSel);
for (;;) {
@@ -122,7 +122,7 @@ bool Troll::getMenuSel(const char *szMenu, int *iSel, int nSel) {
_vm->_system->updateScreen();
_vm->_system->delayMillis(10);
}
-
+
return true;
}
@@ -193,7 +193,7 @@ void Troll::inventory() {
sprintf(tmp, IDS_TRO_TREASURE_4, _treasuresLeft);
_vm->drawStr(20, 10, kColorDefault, tmp);
break;
- }
+ }
pressAnyKey(6);
}
@@ -258,7 +258,7 @@ void Troll::credits() {
_vm->drawStr(15, 8, 10, IDS_TRO_CREDITS_4);
_vm->drawStr(17, 7, 12, IDS_TRO_CREDITS_5);
_vm->drawStr(19, 2, 14, IDS_TRO_CREDITS_6);
-
+
_vm->_gfx->doUpdate();
pressAnyKey();
@@ -274,7 +274,7 @@ void Troll::tutorial() {
_vm->printStr(IDS_TRO_TUTORIAL_0);
_vm->getSelection(kSelSpace);
-
+
_vm->clearScreen(0x55);
_vm->setDefaultTextColor(0x0F);
@@ -317,25 +317,25 @@ void Troll::tutorial() {
_vm->drawStr(6, 1, kColorDefault, IDS_TRO_TUTORIAL_9);
_vm->_gfx->doUpdate();
pressAnyKey();
-
+
_vm->clearScreen(0x19);
_vm->drawStr(7, 1, kColorDefault, IDS_TRO_TUTORIAL_10);
_vm->drawStr(8, 1, kColorDefault, IDS_TRO_TUTORIAL_11);
_vm->_gfx->doUpdate();
pressAnyKey();
-
+
_vm->clearScreen(0x6E);
_vm->drawStr(9, 1, kColorDefault, IDS_TRO_TUTORIAL_12);
_vm->drawStr(10, 1, kColorDefault, IDS_TRO_TUTORIAL_13);
_vm->_gfx->doUpdate();
pressAnyKey();
-
+
_vm->clearScreen(0x4C);
_vm->drawStr(11, 1, kColorDefault, IDS_TRO_TUTORIAL_14);
_vm->drawStr(12, 1, kColorDefault, IDS_TRO_TUTORIAL_15);
_vm->_gfx->doUpdate();
pressAnyKey();
-
+
_vm->clearScreen(0x5D);
_vm->drawStr(13, 1, kColorDefault, IDS_TRO_TUTORIAL_16);
_vm->drawStr(14, 1, kColorDefault, IDS_TRO_TUTORIAL_17);
@@ -369,7 +369,7 @@ void Troll::intro() {
_vm->setDefaultTextColor(0x0f);
drawPic(45, false, true);
_vm->_gfx->doUpdate();
-
+
// wait for keypress and alternate message
waitAnyKeyIntro();
@@ -377,7 +377,7 @@ void Troll::intro() {
_vm->drawStr(22, 3, kColorDefault, IDS_TRO_INTRO_4);
_vm->drawStr(23, 6, kColorDefault, IDS_TRO_INTRO_5);
_vm->_gfx->doUpdate();
-
+
if (!_vm->getSelection(kSelYesNo))
tutorial();
@@ -391,7 +391,7 @@ void Troll::gameOver() {
drawPic(42, true, true);
playTune(4, 25);
-
+
printUserMessage(16);
printUserMessage(33);
@@ -533,7 +533,7 @@ void Troll::printUserMessage(int msgId) {
for (i = 0; i < _userMessages[msgId - 1].num; i++) {
_vm->drawStr(21 + i, 1, kColorDefault, _userMessages[msgId - 1].msg[i]);
}
-
+
if (msgId == 34) {
for (i = 0; i < 2; i++)
playTune(5, 11);
@@ -559,10 +559,10 @@ void Troll::gameLoop() {
memset(_roomStates, 0, sizeof(_roomStates));
memset(_inventory, 0, sizeof(_inventory));
-
+
while (!done) {
*menu = 0;
-
+
currentOption = 0;
numberOfOptions = drawRoom(menu);
@@ -614,7 +614,7 @@ void Troll::gameLoop() {
if (roomParam == 1)
haveFlashlight = true;
- _locMessagesIdx[_currentRoom] = IDO_TRO_LOCMESSAGES +
+ _locMessagesIdx[_currentRoom] = IDO_TRO_LOCMESSAGES +
(roomParam + 42) * 39;
pickupTreasure(roomParam);
diff --git a/engines/agi/preagi_troll.h b/engines/agi/preagi_troll.h
index 8519925e0a..b2764bcdb3 100644
--- a/engines/agi/preagi_troll.h
+++ b/engines/agi/preagi_troll.h
@@ -178,7 +178,7 @@ private:
int _moves;
bool _isTrollAway;
-
+
int _inventory[IDI_TRO_MAX_TREASURE];
bool _soundOn;
diff --git a/engines/agi/preagi_winnie.cpp b/engines/agi/preagi_winnie.cpp
index af653d34c8..87d13bff3d 100644
--- a/engines/agi/preagi_winnie.cpp
+++ b/engines/agi/preagi_winnie.cpp
@@ -162,7 +162,7 @@ void Winnie::randomize() {
}
_game.iUsedObj[i] = iObj;
-
+
done = false;
while (!done) {
iRoom = _vm->rnd(IDI_WTP_MAX_ROOM_NORMAL);
@@ -201,8 +201,8 @@ void Winnie::intro() {
}
int Winnie::getObjInRoom(int iRoom) {
- for (int iObj = 1; iObj < IDI_WTP_MAX_ROOM_OBJ; iObj++)
- if (_game.iObjRoom[iObj] == iRoom)
+ for (int iObj = 1; iObj < IDI_WTP_MAX_ROOM_OBJ; iObj++)
+ if (_game.iObjRoom[iObj] == iRoom)
return iObj;
return 0;
}
@@ -267,12 +267,12 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
// check if NSEW directions should be displayed
if (hdr.roomNew[0])
- fCanSel[IDI_WTP_SEL_NORTH] = fCanSel[IDI_WTP_SEL_SOUTH] =
+ fCanSel[IDI_WTP_SEL_NORTH] = fCanSel[IDI_WTP_SEL_SOUTH] =
fCanSel[IDI_WTP_SEL_EAST] = fCanSel[IDI_WTP_SEL_WEST] = true;
// check if object in room or player carrying one
setTakeDrop();
-
+
// check which rows have a menu option
for (iSel = 0; iSel < IDI_WTP_MAX_OPTION; iSel++) {
opcode = *(buffer + pc++);
@@ -291,7 +291,7 @@ int Winnie::parser(int pc, int index, uint8 *buffer) {
printStrWinnie((char *)(buffer + pc));
if (_vm->getSelection(kSelBackspace) == 1)
return IDI_WTP_PAR_OK;
- else
+ else
return IDI_WTP_PAR_BACK;
}
@@ -558,7 +558,7 @@ void Winnie::dropObj(int iRoom) {
// increase amount of objects returned, decrease amount of objects missing
_game.nObjMiss--;
_game.nObjRet++;
-
+
// xor the dropped object with 0x80 to signify it has been dropped in the right place
for (int i = 0; i < IDI_WTP_MAX_OBJ_MISSING; i++) {
if (_game.iUsedObj[i] == _game.iObjHave) {
@@ -569,10 +569,10 @@ void Winnie::dropObj(int iRoom) {
// set flag according to dropped object's id
_game.fGame[iCode] = 1;
-
+
// player is carrying nothing
_game.iObjHave = 0;
-
+
if (!_game.nObjMiss) {
// all objects returned, tell player to find party
playSound(IDI_WTP_SND_FANFARE);
@@ -605,7 +605,7 @@ void Winnie::dropObj(int iRoom) {
void Winnie::dropObjRnd() {
if (!_game.iObjHave)
return;
-
+
int iRoom = 0;
bool done = false;
@@ -708,7 +708,7 @@ void Winnie::drawMenu(char *szMenu, int iSel, int fCanSel[]) {
_vm->drawStr(IDI_WTP_ROW_OPTION_4, IDI_WTP_COL_TAKE, IDA_DEFAULT, IDS_WTP_TAKE);
if (fCanSel[IDI_WTP_SEL_DROP])
_vm->drawStr(IDI_WTP_ROW_OPTION_4, IDI_WTP_COL_DROP, IDA_DEFAULT, IDS_WTP_DROP);
-
+
switch(iSel) {
case IDI_WTP_SEL_OPT_1:
case IDI_WTP_SEL_OPT_2:
@@ -812,7 +812,7 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) {
if (fCanSel[IDI_WTP_SEL_NORTH] && hotspotNorth.contains(event.mouse.x, event.mouse.y)) {
_vm->_gfx->setCursorPalette(true);
} else if (fCanSel[IDI_WTP_SEL_SOUTH] && hotspotSouth.contains(event.mouse.x, event.mouse.y)) {
- _vm->_gfx->setCursorPalette(true);
+ _vm->_gfx->setCursorPalette(true);
} else if (fCanSel[IDI_WTP_SEL_WEST] && hotspotWest.contains(event.mouse.x, event.mouse.y)) {
_vm->_gfx->setCursorPalette(true);
} else if (fCanSel[IDI_WTP_SEL_EAST] && hotspotEast.contains(event.mouse.x, event.mouse.y)) {
@@ -974,7 +974,7 @@ void Winnie::getMenuSel(char *szMenu, int *iSel, int fCanSel[]) {
}
break;
}
- default:
+ default:
if (!event.kbd.flags) { // if the control/alt/shift keys are not pressed
keyHelp();
clrMenuSel(iSel, fCanSel);
@@ -1062,7 +1062,7 @@ void Winnie::drawObjPic(int iObj, int x0, int y0) {
uint8 *buffer = (uint8 *)malloc(2048);
uint32 objSize = readObj(iObj, buffer);
parseObjHeader(&objhdr, buffer, sizeof(WTP_OBJ_HDR));
-
+
_vm->_picture->setOffset(x0, y0);
_vm->_picture->decodePicture(buffer + objhdr.ofsPic - _objOffset, objSize, 0, IDI_WTP_PIC_WIDTH, IDI_WTP_PIC_HEIGHT);
_vm->_picture->setOffset(0, 0);
@@ -1191,7 +1191,7 @@ void Winnie::loadGame() {
// Note that the original saves variables as 16-bit integers, but only 8 bits are used.
// Since we read the save file data as little-endian, we skip the first byte of each
// variable
-
+
infile->seek(0); // Jump back to the beginning of the file
infile->readUint16LE(); // skip unused field
@@ -1222,7 +1222,7 @@ void Winnie::loadGame() {
for(i = 0; i < IDI_WTP_MAX_ROOM_OBJ; i++)
_game.iObjRoom[i] = infile->readByte();
- // Note that saved games from the original interpreter have 2 more 16-bit fields here
+ // Note that saved games from the original interpreter have 2 more 16-bit fields here
// which are ignored
delete infile;
diff --git a/engines/agi/predictive.cpp b/engines/agi/predictive.cpp
index 7f41c27a6a..d96a5f3a0a 100644
--- a/engines/agi/predictive.cpp
+++ b/engines/agi/predictive.cpp
@@ -49,7 +49,7 @@ uint8 countWordsInString(char *str) {
if (!str)
return 0;
- ptr = strchr(str, ' ');
+ ptr = strchr(str, ' ');
if (!ptr) {
debug("Invalid dictionary line");
return 0;
@@ -111,7 +111,7 @@ bool AgiEngine::predictiveDialog(void) {
"(7)pqrs", "(8)tuv", "(9)wxyz",
"(#)next", "add",
"<",
- "Cancel", "OK",
+ "Cancel", "OK",
"Pre", "(0) ", NULL
};
const int colors[] = {
@@ -198,7 +198,7 @@ bool AgiEngine::predictiveDialog(void) {
|| (mode == kModeAbc && _currentWord.size() && _currentWord.lastChar() != ' '))) { // Next
color2 = 7;
}
-
+
// needs fixing, or remove it!
bool _addIsActive = false; // FIXME: word adding is not implemented
if (i == 10 && !_addIsActive) { // Add
diff --git a/engines/agi/sound.h b/engines/agi/sound.h
index 5d9bfda445..2e6902111c 100644
--- a/engines/agi/sound.h
+++ b/engines/agi/sound.h
@@ -129,9 +129,9 @@ struct IIgsOscillatorList {
IIgsOscillator osc[MAX_OSCILLATORS]; ///< The oscillators
/** Indexing operators for easier access to the oscillators. */
- const IIgsOscillator &operator()(uint index) const { return osc[index]; }
+ const IIgsOscillator &operator()(uint index) const { return osc[index]; }
IIgsOscillator &operator()(uint index) { return osc[index]; }
-
+
/** Reads an Apple IIGS oscillator list from the given stream. */
bool read(Common::SeekableReadStream &stream, uint oscillatorCount, bool ignoreAddr = false);
bool finalize(Common::SeekableReadStream &uint8Wave);
diff --git a/engines/agi/sprite.cpp b/engines/agi/sprite.cpp
index 3126fb66af..2735809ac5 100644
--- a/engines/agi/sprite.cpp
+++ b/engines/agi/sprite.cpp
@@ -57,7 +57,7 @@ void *SpritesMgr::poolAlloc(int size) {
uint8 *x;
/* Adjust size to 32-bit boundary to prevent data misalignment
- * errors.
+ * errors.
*/
size = (size + 3) & ~3;
diff --git a/engines/agi/sprite.h b/engines/agi/sprite.h
index 401446249b..3f9b329076 100644
--- a/engines/agi/sprite.h
+++ b/engines/agi/sprite.h
@@ -59,7 +59,7 @@ private:
int blitCel(int x, int y, int spr, ViewCel *c, bool agi256_2);
void objsSaveArea(Sprite *s);
void objsRestoreArea(Sprite *s);
-
+
FORCEINLINE int prioToY(int p);
Sprite *newSprite(VtEntry *v);
void sprAddlist(SpriteList &l, VtEntry *v);
@@ -69,10 +69,10 @@ private:
void freeList(SpriteList &l);
void commitSprites(SpriteList &l);
void eraseSprites(SpriteList &l);
- void blitSprites(SpriteList &l);
+ void blitSprites(SpriteList &l);
static bool testUpdating(VtEntry *v, AgiEngine *);
static bool testNotUpdating(VtEntry *v, AgiEngine *);
-
+
public:
SpritesMgr(AgiEngine *agi, GfxMgr *gfx);
~SpritesMgr();
diff --git a/engines/agi/text.cpp b/engines/agi/text.cpp
index aea1468dcb..abaf763872 100644
--- a/engines/agi/text.cpp
+++ b/engines/agi/text.cpp
@@ -91,7 +91,7 @@ void AgiEngine::printText2(int l, const char *msg, int foff, int xoff, int yoff,
}
x1++;
-
+
/* DF: changed the len-1 to len... */
if (x1 == len && m[1] != '\n')
y1++, x1 = foff = 0;
diff --git a/engines/agi/view.cpp b/engines/agi/view.cpp
index 2eb11c9b91..07387161e8 100644
--- a/engines/agi/view.cpp
+++ b/engines/agi/view.cpp
@@ -45,7 +45,7 @@ void AgiEngine::lSetCel(VtEntry *v, int n) {
// WORKAROUND: This is a very nasty hack to fix a bug in the KQ4 introduction
// In its original form, it caused a lot of regressions, including KQ4 bugs and crashes
// Refer to Sarien bug #588899 for the original issue
- // Modifying this workaround to only work for a specific view in the KQ4 intro fixes several
+ // Modifying this workaround to only work for a specific view in the KQ4 intro fixes several
// ScummVM bugs. Refer to bugs #1660486, #1660169, #1660192, #1660162 and #1660354
// FIXME: Remove this workaround and investigate the reason for the erroneous actor behavior
// in the KQ4 introduction
diff --git a/engines/agi/wagparser.h b/engines/agi/wagparser.h
index 1fc554d522..2f4003315f 100644
--- a/engines/agi/wagparser.h
+++ b/engines/agi/wagparser.h
@@ -26,7 +26,7 @@
namespace Agi {
/**
- * WagProperty represents a single property from WinAGI's *.wag file.
+ * WagProperty represents a single property from WinAGI's *.wag file.
* A property consists of a header and of data.
* The header consists of the following:
* - Property code (Integer/Enumeration, 1 byte)
@@ -62,7 +62,7 @@ public:
PC_VIEW = 240,
PC_UNDEFINED = 0x100 ///< An undefined property code (Added for ScummVM).
};
-
+
/**
* Property types taken from WinAGI 1.1.21's source code file WinAGI/AGIObjects.bas.
* At the moment these aren't really at all needed by ScummVM. Just here if anyone decides to use them.
@@ -97,7 +97,7 @@ public:
* No property header or property data in it.
*/
WagProperty();
-
+
/**
* Destructor. Releases allocated memory if any etc. The usual.
*/
@@ -119,7 +119,7 @@ protected:
* Sets the default values for member variables.
*/
void setDefaults();
-
+
/**
* Delete's the property's data from memory if we have it, otherwise does nothing.
*/
@@ -138,7 +138,7 @@ public:
* @return True if reading was a success, false otherwise.
*/
bool read(Common::SeekableReadStream &stream);
-
+
/**
* Clears the property.
* After this the property is empty. No header or data.
@@ -146,7 +146,7 @@ public:
void clear();
// Public access functions
-public:
+public:
/**
* Was the property read ok from the source stream?
*/
@@ -157,25 +157,25 @@ public:
* @return The property's code if readOk(), PC_UNDEFINED otherwise.
*/
enum WagPropertyCode getCode() const { return _propCode; };
-
+
/**
* Return the property's type.
* @return The property's type if readOk(), PT_UNDEFINED otherwise.
- */
+ */
enum WagPropertyType getType() const { return _propType; };
-
+
/**
* Return the property's number.
* @return The property's number if readOk(), 0 otherwise.
- */
+ */
byte getNumber() const { return _propNum; };
-
+
/**
* Return the property's data's length.
* @return The property's data's length if readOk(), 0 otherwise.
*/
uint16 getSize() const { return _propSize; }
-
+
/**
* Return property's data. Constant access version.
* Can be used as a C-style string (i.e. this is guaranteed to have a trailing zero).
@@ -200,16 +200,16 @@ protected:
*/
class WagFileParser {
// Constants, type definitions, enumerations etc.
-public:
- static const uint WINAGI_VERSION_LENGTH = 16; ///< WinAGI's version string's length (Always 16)
+public:
+ static const uint WINAGI_VERSION_LENGTH = 16; ///< WinAGI's version string's length (Always 16)
typedef Common::Array<WagProperty> PropertyList; ///< A type definition for an array of *.wag file properties
-
+
public:
/**
* Constructor. Creates a WagFileParser object in a default state.
*/
WagFileParser();
-
+
/**
* Destructor.
*/
@@ -220,7 +220,7 @@ public:
* @note After this you can access the loaded properties using getProperty() and getProperties() etc.
* @param filename Name of the file to be parsed.
* @return True if parsed successfully, false otherwise.
- */
+ */
bool parse(const char *filename);
/**
@@ -229,7 +229,7 @@ public:
* @return The list of loaded properties.
*/
const PropertyList &getProperties() const { return _propList; };
-
+
/**
* Get property with the given property code.
* @note Use only after a call to parse() first.
@@ -257,7 +257,7 @@ public:
* @return AGI interpreter version number if successful, 0 otherwise.
*/
uint16 convertToAgiVersionNumber(const WagProperty &version);
-
+
/**
* Was the file parsed successfully?
* @return True if file was parsed successfully, false otherwise.
diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp
index bccd515e0b..7e5613f027 100644
--- a/engines/agos/agos.cpp
+++ b/engines/agos/agos.cpp
@@ -523,7 +523,7 @@ AGOSEngine::AGOSEngine(OSystem *syst)
File::addDefaultDirectory(_gameDataPath + "SFX");
File::addDefaultDirectory(_gameDataPath + "speech");
File::addDefaultDirectory(_gameDataPath + "SPEECH");
-
+
syst->getEventManager()->registerRandomSource(_rnd, "agos");
}
diff --git a/engines/agos/agos.h b/engines/agos/agos.h
index bccd5d9032..2e8a20f6fd 100644
--- a/engines/agos/agos.h
+++ b/engines/agos/agos.h
@@ -592,7 +592,7 @@ protected:
void setUserItem(Item *item, int n, int m);
void paletteFadeOut(byte *palPtr, uint num, uint size);
-
+
byte *allocateItem(uint size);
byte *allocateTable(uint size);
void alignTableMem();
@@ -795,7 +795,7 @@ protected:
virtual void drawIconArray(uint i, Item *item_ptr, int line, int classMask);
void removeIconArray(uint num);
- void loadIconData();
+ void loadIconData();
void loadIconFile();
void loadMenuFile();
@@ -1054,7 +1054,7 @@ public:
void o_setDollar();
void o_isBox();
- int16 levelOf(Item *item);
+ int16 levelOf(Item *item);
int16 moreText(Item *i);
void lobjFunc(Item *i, const char *f);
uint confirmYesOrNo(uint16 x, uint16 y);
diff --git a/engines/agos/animation.h b/engines/agos/animation.h
index 6776395ab7..4e8f15e33a 100644
--- a/engines/agos/animation.h
+++ b/engines/agos/animation.h
@@ -51,7 +51,7 @@ class MoviePlayer : public Graphics::DXAPlayer {
bool _leftButtonDown;
bool _rightButtonDown;
uint32 _ticks;
-
+
char baseName[40];
static const char *_sequenceList[90];
uint8 _sequenceNum;
diff --git a/engines/agos/intern.h b/engines/agos/intern.h
index a6d843d183..6becd8fc73 100644
--- a/engines/agos/intern.h
+++ b/engines/agos/intern.h
@@ -38,7 +38,7 @@ enum ChildType {
kContainerType = 7,
kChainType = 8,
kUserFlagType = 9,
-
+
kInheritType = 255
};
diff --git a/engines/agos/module.mk b/engines/agos/module.mk
index 33a40bbbfb..d217dd7cfb 100644
--- a/engines/agos/module.mk
+++ b/engines/agos/module.mk
@@ -51,5 +51,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/agos/script_e2.cpp b/engines/agos/script_e2.cpp
index e1ee4d4c3e..9bbcbf15b3 100644
--- a/engines/agos/script_e2.cpp
+++ b/engines/agos/script_e2.cpp
@@ -654,7 +654,7 @@ void AGOSEngine_Elvira2::oe2_isAdjNoun() {
int16 a = getNextWord(), b = getNextWord();
if (getGameType() == GType_ELVIRA2) {
- // WORKAROUND bug #1745996: A NULL item can occur when
+ // WORKAROUND bug #1745996: A NULL item can occur when
// interacting with items in the dinning room
if (item == NULL) {
setScriptCondition(false);
diff --git a/engines/cine/module.mk b/engines/cine/module.mk
index 07e267289f..23792a17b9 100644
--- a/engines/cine/module.mk
+++ b/engines/cine/module.mk
@@ -25,5 +25,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/cruise/actor.cpp b/engines/cruise/actor.cpp
index 50ab7e1656..943ffa5c8d 100644
--- a/engines/cruise/actor.cpp
+++ b/engines/cruise/actor.cpp
@@ -89,7 +89,7 @@ void getPixel(int x, int y) {
tableau+=u*2;
x_min = *tableau++;
x_max = *tableau++;
-
+
if ( (x>=x_min && x<=x_max) ) {
flag_obstacle = walkboxColor[computedVar14];
@@ -1001,8 +1001,8 @@ void processAnimation(void) {
/*
* if (pl->next_dir!=pl->start_dir)
* {
- * pl->phase=PHASE_STATIC;
- * pl->cnt=0;
+ * pl->phase=PHASE_STATIC;
+ * pl->cnt=0;
* break;
* }
*/
diff --git a/engines/cruise/background.cpp b/engines/cruise/background.cpp
index 9d1bf61267..15b4c91e47 100644
--- a/engines/cruise/background.cpp
+++ b/engines/cruise/background.cpp
@@ -162,7 +162,7 @@ int loadBackground(const char *name, int idx) {
{
uint8* inPtr = ptr2 + i * 2;
uint8* outPtr = palScreen[idx] +i * 3;
-
+
outPtr[2] = ((inPtr[1])&0x0F) * 17;
outPtr[1] = (((inPtr[1])&0xF0) >> 4) * 17;
outPtr[0] = ((inPtr[0])&0x0F) * 17;
diff --git a/engines/cruise/backgroundIncrust.cpp b/engines/cruise/backgroundIncrust.cpp
index e4a716b25a..c66fb9eb9b 100644
--- a/engines/cruise/backgroundIncrust.cpp
+++ b/engines/cruise/backgroundIncrust.cpp
@@ -165,7 +165,7 @@ backgroundIncrustStruct *addBackgroundIncrust(int16 overlayIdx, int16 objectIdx,
int newY;
int newScale;
char *newFrame;
-
+
int sizeTable[4]; // 0 = left, 1 = right, 2 = bottom, 3 = top
// this function checks if the dataPtr is not 0, else it retrives the data for X, Y, scale and DataPtr again (OLD: mainDrawSub1Sub1)
@@ -202,7 +202,7 @@ void saveIncrust(Common::OutSaveFile& currentSaveFile) {
char dummy[4] = {0, 0, 0, 0};
currentSaveFile.write(dummy, 2);
currentSaveFile.write(dummy, 2);
-
+
currentSaveFile.writeSint16LE(pl->objectIdx);
currentSaveFile.writeSint16LE(pl->type);
currentSaveFile.writeSint16LE(pl->overlayIdx);
@@ -249,7 +249,7 @@ void loadBackgroundIncrustFromSave(Common::InSaveFile& currentSaveFile) {
currentSaveFile.skip(2);
currentSaveFile.skip(2);
-
+
pl2->objectIdx = currentSaveFile.readSint16LE();
pl2->type = currentSaveFile.readSint16LE();
pl2->overlayIdx = currentSaveFile.readSint16LE();
diff --git a/engines/cruise/cell.cpp b/engines/cruise/cell.cpp
index a716d0b61f..2c990817eb 100644
--- a/engines/cruise/cell.cpp
+++ b/engines/cruise/cell.cpp
@@ -135,7 +135,7 @@ void loadSavegameDataSub2(Common::InSaveFile& currentSaveFile) {
t->animCounter = currentSaveFile.readSint16LE();
t->animLoop = currentSaveFile.readSint16LE();
currentSaveFile.skip(2);
-
+
t->next = NULL;
p->next = t;
t->prev = cellHead.prev;
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 1c0f1fd8ab..5d16c6e68a 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -899,7 +899,7 @@ bool createDialog(int objOvl, int objIdx, int x, int y) {
if (!verbeOvl) verbeOvl=j;
if (!obj1Ovl) obj1Ovl=j;
if (!obj2Ovl) obj2Ovl=j;
-
+
char verbe_name[80];
char obj1_name[80];
char obj2_name[80];
@@ -999,7 +999,7 @@ bool findRelation(int objOvl, int objIdx, int x, int y) {
if (!verbeOvl) verbeOvl=j;
if (!obj1Ovl) obj1Ovl=j;
if (!obj2Ovl) obj2Ovl=j;
-
+
char verbe_name[80];
char obj1_name[80];
char obj2_name[80];
@@ -1282,7 +1282,7 @@ void callRelation(menuElementSubStruct *pMenuElement, int nObj2) {
{
createTextObject(&cellHead, ovlIdx, pHeader->id, x, y, 200, findHighColor(), masterScreen, 0, 0);
}
-
+
userWait = 1;
autoOvl = ovlIdx;
autoMsg = pHeader->id;
@@ -1393,7 +1393,7 @@ int processInput(void) {
}
if (dialogueEnabled) {
-
+
if( menuDown || selectDown || linkedRelation ) {
closeAllMenu();
menuDown = 0;
@@ -1818,17 +1818,17 @@ void mainLoop(void) {
static int16 oldMouseY = -1;
getMouseStatus(&main10, &mouseX, &mouseButton, &mouseY);
-
+
if (mouseX != oldMouseX && mouseY != oldMouseY) {
int objectType;
int newCursor1;
int newCursor2;
-
+
oldMouseX = mouseX;
oldMouseY = mouseY;
-
+
objectType = findObject(mouseX, mouseY, &newCursor1, &newCursor2);
-
+
if (objectType == 9) {
changeCursor(CURSOR_EXIT);
} else if (objectType != -1) {
diff --git a/engines/cruise/ctp.cpp b/engines/cruise/ctp.cpp
index de14dba761..6c7be713ef 100644
--- a/engines/cruise/ctp.cpp
+++ b/engines/cruise/ctp.cpp
@@ -192,7 +192,7 @@ void makeCtStruct(uint8* str, int16 table[][40], int num, int z) {
int getNode(int nodeResult[2], int nodeId){
if (nodeId < 0 || nodeId >= ctp_routeCoordCount)
return -1;
-
+
nodeResult[0] = ctp_routeCoords[nodeId][0];
nodeResult[1] = ctp_routeCoords[nodeId][1];
@@ -206,7 +206,7 @@ int setNodeColor(int nodeIdx, int nodeColor) {
int oldColor = walkboxColor[nodeIdx];
if(nodeColor == -1)
- return
+ return
walkboxColor[nodeIdx] = nodeColor;
@@ -220,7 +220,7 @@ int setNodeState(int nodeIdx, int nodeState) {
int oldState = walkboxState[nodeIdx];
if(nodeState == -1)
- return
+ return
walkboxState[nodeIdx] = nodeState;
diff --git a/engines/cruise/dataLoader.cpp b/engines/cruise/dataLoader.cpp
index e0bfe70dc0..7ce69448a6 100644
--- a/engines/cruise/dataLoader.cpp
+++ b/engines/cruise/dataLoader.cpp
@@ -257,7 +257,7 @@ int loadFile(const char* name, int idx, int destIdx)
int numMaxEntriesInSet = getNumMaxEntiresInSet(ptr);
if (idx > numMaxEntriesInSet) {
- return 0; // exit if limit is reached
+ return 0; // exit if limit is reached
}
return loadSetEntry(name, ptr, idx, destIdx );
@@ -296,7 +296,7 @@ int loadFileRange(const char *name, int startIdx, int currentEntryIdx, int numId
for (i = 0; i < numIdx; i++) {
if ((startIdx + i) > numMaxEntriesInSet) {
- return 0; // exit if limit is reached
+ return 0; // exit if limit is reached
}
loadSetEntry(name, ptr, startIdx + i, currentEntryIdx + i );
}
diff --git a/engines/cruise/decompiler.cpp b/engines/cruise/decompiler.cpp
index 97515f751e..7eca816ec7 100644
--- a/engines/cruise/decompiler.cpp
+++ b/engines/cruise/decompiler.cpp
@@ -281,11 +281,11 @@ void addDecomp(char *string, ...) {
va_list va;
/* fprintf(fHandle,"%d: ",currentLineIdx);
- *
+ *
* va_start(va,string);
* vfprintf(fHandle,string,va);
* va_end(va);
- *
+ *
* fprintf(fHandle,"\n"); */
struct decompileLineStruct *pLineStruct =
@@ -305,11 +305,11 @@ void addDecomp(char *string, ...) {
currentLineType = 0;
/*printf("%d: ",currentOffset);
- *
+ *
* va_start(va,string);
* vprintf(string,va);
* va_end(va);
- *
+ *
* printf("\n"); */
}
diff --git a/engines/cruise/function.cpp b/engines/cruise/function.cpp
index 7adc358bee..b15c8fdb4f 100644
--- a/engines/cruise/function.cpp
+++ b/engines/cruise/function.cpp
@@ -950,7 +950,7 @@ int16 Op_ComputeLine(void) {
int x2 = popVar();
int y1 = popVar();
int x1 = popVar();
-
+
point* pDest = (point*)popPtr();
int maxValue = cor_droite( x1, y1, x2, y2, pDest);
@@ -1382,7 +1382,7 @@ int16 Op_Strcat(void) {
while(*pSource)
*(pDest++) = *(pSource++);
*(pDest++) = '\0';
-
+
return 0;
}
@@ -1559,7 +1559,7 @@ int16 Op_UserWait(void)
return 0;
}
-opcodeFunction opcodeTablePtr[] =
+opcodeFunction opcodeTablePtr[] =
{
NULL, // 0x00
Op_FadeIn,
diff --git a/engines/cruise/mainDraw.cpp b/engines/cruise/mainDraw.cpp
index 5a519dbd02..1a1be3940b 100644
--- a/engines/cruise/mainDraw.cpp
+++ b/engines/cruise/mainDraw.cpp
@@ -408,7 +408,7 @@ void buildSegment(void) {
int Y2 = di[3];
int Y1 = di[1];
-
+
int tempAX = Y1;
int tempDX = Y2;
if (tempAX > tempDX) {
@@ -750,9 +750,9 @@ void buildPolyModel(int positionX, int positionY, int scale, char *pMask, char *
/*
* NOTE:
- *
+ *
* The original code continues here with using X, Y instead of startX and StartY.
- *
+ *
* Original code:
* positionX -= (upscaleValue(startX, m_scaleValue) + 0x8000) >> 16;
* positionY -= (upscaleValue(startX, m_scaleValue) + 0x8000) >> 16;
@@ -836,7 +836,7 @@ void buildPolyModel(int positionX, int positionY, int scale, char *pMask, char *
flipShort(&minimumScale);
- if ((minimumScale <= scale)) {
+ if ((minimumScale <= scale)) {
if (m_flipLeftRight) {
drawPolyMode1((unsigned char *)dataPointer, linesToDraw);
} else {
@@ -911,9 +911,9 @@ bool findPoly(char* dataPtr, int positionX, int positionY, int scale, int mouseX
/*
* NOTE:
- *
+ *
* The original code continues here with using X, Y instead of startX and StartY.
- *
+ *
* Original code:
* positionX -= (upscaleValue(startX, m_scaleValue) + 0x8000) >> 16;
* positionY -= (upscaleValue(startX, m_scaleValue) + 0x8000) >> 16;
@@ -997,7 +997,7 @@ bool findPoly(char* dataPtr, int positionX, int positionY, int scale, int mouseX
flipShort(&minimumScale);
- if ((minimumScale <= scale)) {
+ if ((minimumScale <= scale)) {
if (m_flipLeftRight) {
drawPolyMode1((unsigned char *)dataPointer, linesToDraw);
} else {
@@ -1065,7 +1065,7 @@ void mainDrawPolygons(int fileIndex, cellStruct *plWork, int X, int scale, int Y
int newY;
int newScale;
char *newFrame;
-
+
int var_8; // unused
int sizeTable[4]; // 0 = left, 1 = right, 2 = bottom, 3 = top
@@ -1284,7 +1284,7 @@ void drawCtp(void) {
void drawMenu(menuStruct *pMenu) {
if (pMenu == NULL)
return;
-
+
if(pMenu->numElements == 0)
return;
diff --git a/engines/cruise/module.mk b/engines/cruise/module.mk
index 0af8678b4a..2d5062dc38 100644
--- a/engines/cruise/module.mk
+++ b/engines/cruise/module.mk
@@ -37,6 +37,6 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/cruise/mouse.cpp b/engines/cruise/mouse.cpp
index 20616a72ee..a5e6c12be2 100644
--- a/engines/cruise/mouse.cpp
+++ b/engines/cruise/mouse.cpp
@@ -119,7 +119,7 @@ int16 main10;
int hotspotY;
const byte *bitmap;
};
-
+
static const MouseCursor mouseCursors[] = {
{ 1, 1, mouseCursorNormal },
{ 0, 0, mouseCursorDisk },
diff --git a/engines/cruise/overlay.cpp b/engines/cruise/overlay.cpp
index 67f9bbab6e..d3cb93c37c 100644
--- a/engines/cruise/overlay.cpp
+++ b/engines/cruise/overlay.cpp
@@ -279,7 +279,7 @@ int loadOverlay(const char *scriptName) {
if (!ptr) {
/* releaseScript(scriptIdx,scriptName);
- *
+ *
* if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
@@ -328,7 +328,7 @@ int loadOverlay(const char *scriptName) {
if (!ptr) {
/* releaseScript(scriptIdx,scriptName);
- *
+ *
* if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
@@ -494,7 +494,7 @@ int loadOverlay(const char *scriptName) {
}
if (ovlData->
- specialString1Length /*|| ovlData->specialString2Length */
+ specialString1Length /*|| ovlData->specialString2Length */
|| ovlData->stringTable) {
int i;
//int unpackedSize;
@@ -549,7 +549,7 @@ int loadOverlay(const char *scriptName) {
if (!ovlData->nameVerbGlob) {
/* releaseScript(scriptIdx,scriptName);
- *
+ *
* if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
@@ -572,7 +572,7 @@ int loadOverlay(const char *scriptName) {
if (!ovlData->arrayNameObj) {
/* releaseScript(scriptIdx,scriptName);
- *
+ *
* if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
@@ -598,7 +598,7 @@ int loadOverlay(const char *scriptName) {
if (!ovlData->stringTable[i].string) {
/* releaseScript(scriptIdx,scriptName);
- *
+ *
* if (freeIsNeeded)
* {
* freePtr(unpackedBuffer);
diff --git a/engines/cruise/perso.cpp b/engines/cruise/perso.cpp
index e899fa0d1c..c25476ee2a 100644
--- a/engines/cruise/perso.cpp
+++ b/engines/cruise/perso.cpp
@@ -196,7 +196,7 @@ void processActorWalk(int16 resx_y[4], int16 *inc_droite, int16 *inc_droite0,
return;
}
-
+
*inc_droite0 = cor_droite(x1, y1, x2, y2, cor_joueur);
*dir_perso = resx_y[2] = direction(x1, y1, x2, y2, *inc_jo1, *inc_jo2);
*inc_jo0 = inc_jo;
diff --git a/engines/cruise/saveload.cpp b/engines/cruise/saveload.cpp
index 77cd904973..63edf7cb36 100644
--- a/engines/cruise/saveload.cpp
+++ b/engines/cruise/saveload.cpp
@@ -564,7 +564,7 @@ int saveSavegameData(int saveGameIdx) {
currentSaveFile->write(workpal, sizeof(int16) * NBCOLORS);
currentSaveFile->write(musicName, 15);
-
+
const char dummy[6] = { 0, 0, 0, 0, 0, 0 };
currentSaveFile->write(dummy, 6);
diff --git a/engines/cruise/vars.h b/engines/cruise/vars.h
index 04568337d6..a325de3f36 100644
--- a/engines/cruise/vars.h
+++ b/engines/cruise/vars.h
@@ -270,7 +270,7 @@ extern int16 ctp_routeCoords[20][2]; // ctpVar3 // path-finding coordinates
extern int16 ctp_routes[20][10]; // path-finding line information
/* ctp_routes:
-
+
correct size would be: ctp_routes[routeCoordCount * 20 * 2]
array is seperate in 20 * 2 bytes slices.
first 2 bytes of the slice indicate how many coordinates/lines are following (lineCount)
diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp
index 2624039fd1..84f154b7c0 100644
--- a/engines/drascula/drascula.cpp
+++ b/engines/drascula/drascula.cpp
@@ -5337,7 +5337,7 @@ void DrasculaEngine::pantalla_0() {
} else if (num_ejec == 4) {
if (objeto_que_lleva == MIRAR) {
hablar(mirar_t[c_mirar], mirar_v[c_mirar]);
- c_mirar++;
+ c_mirar++;
if (c_mirar == 3)
c_mirar = 0;
} else if (objeto_que_lleva == MOVER)
@@ -6208,29 +6208,29 @@ void DrasculaEngine::actualiza_datos() {
} else if (num_ejec == 3) {
// nothing
} else if (num_ejec == 4) {
- if (!strcmp(num_room, "23.alg") && flags[0] == 0 && flags[11] == 0)
+ if (!strcmp(num_room, "23.alg") && flags[0] == 0 && flags[11] == 0)
visible[2] = 1;
- if (!strcmp(num_room, "23.alg") && flags[0] == 1 && flags[11] == 0)
+ if (!strcmp(num_room, "23.alg") && flags[0] == 1 && flags[11] == 0)
visible[2] = 0;
- if (!strcmp(num_room, "21.alg") && flags[10] == 1)
+ if (!strcmp(num_room, "21.alg") && flags[10] == 1)
visible[2] = 0;
if (!strcmp(num_room, "22.alg") && flags[26] == 1) {
- visible[2] = 0;
+ visible[2] = 0;
visible[1] = 1;
}
- if (!strcmp(num_room, "22.alg") && flags[27] == 1)
+ if (!strcmp(num_room, "22.alg") && flags[27] == 1)
visible[3] = 0;
- if (!strcmp(num_room, "26.alg") && flags[21] == 0)
+ if (!strcmp(num_room, "26.alg") && flags[21] == 0)
strcpy(nombre_obj[2], "HUNCHBACKED");
- if (!strcmp(num_room, "26.alg") && flags[18] == 1)
+ if (!strcmp(num_room, "26.alg") && flags[18] == 1)
visible[2] = 0;
- if (!strcmp(num_room, "26.alg") && flags[12] == 1)
+ if (!strcmp(num_room, "26.alg") && flags[12] == 1)
visible[1] = 0;
- if (!strcmp(num_room, "35.alg") && flags[14] == 1)
+ if (!strcmp(num_room, "35.alg") && flags[14] == 1)
visible[2] = 0;
- if (!strcmp(num_room, "35.alg") && flags[17] == 1)
+ if (!strcmp(num_room, "35.alg") && flags[17] == 1)
visible[3] = 1;
- if (!strcmp(num_room, "35.alg") && flags[15] == 1)
+ if (!strcmp(num_room, "35.alg") && flags[15] == 1)
visible[1] = 0;
} else if (num_ejec == 5) {
if (!strcmp(num_room,"49.alg") && flags[6] == 1)
@@ -6256,7 +6256,7 @@ void DrasculaEngine::actualiza_datos() {
espuerta[1] = 0;
if (!strcmp(num_room, "60.alg")) {
sentido_dr = 0;
- x_dr = 155;
+ x_dr = 155;
y_dr = 69;
}
}
@@ -9964,7 +9964,7 @@ void DrasculaEngine::pantalla_3(int fl) {
else if (objeto_que_lleva == CERRAR && fl == 129)
hablar(TEXT10, "10.als");
else if (objeto_que_lleva == HABLAR && fl == 129) {
- hablar(TEXT23, "23.als");
+ hablar(TEXT23, "23.als");
pausa(6);
hablar_sinc(TEXT50, "50.als", "11111111111144432554433");
} else if (objeto_que_lleva == MIRAR && fl == 131)
@@ -9978,7 +9978,7 @@ void DrasculaEngine::pantalla_3(int fl) {
else if (objeto_que_lleva == CERRAR && fl == 131)
hablar(TEXT10, "10.als");
else if (objeto_que_lleva == HABLAR && fl == 131)
- hablar(TEXT23, "23.als");
+ hablar(TEXT23, "23.als");
else if (objeto_que_lleva == MIRAR && fl == 132)
hablar(TEXT28, "28.als");
else if (objeto_que_lleva == COGER && fl == 132)
@@ -9990,7 +9990,7 @@ void DrasculaEngine::pantalla_3(int fl) {
else if (objeto_que_lleva == CERRAR && fl == 132)
hablar(TEXT10, "10.als");
else if (objeto_que_lleva == HABLAR && fl == 132)
- hablar(TEXT23, "23.als");
+ hablar(TEXT23, "23.als");
else if (objeto_que_lleva == MIRAR && fl == 133)
hablar(TEXT321, "321.als");
else if (objeto_que_lleva == COGER && fl == 133)
@@ -10002,7 +10002,7 @@ void DrasculaEngine::pantalla_3(int fl) {
else if (objeto_que_lleva == CERRAR && fl == 133)
hablar(TEXT10, "10.als");
else if (objeto_que_lleva == HABLAR && fl == 133) {
- hablar_sinc(TEXT322, "322.als", "13333334125433333333");
+ hablar_sinc(TEXT322, "322.als", "13333334125433333333");
refresca_pantalla();
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
pausa(25);
@@ -10038,7 +10038,7 @@ void DrasculaEngine::pantalla_3(int fl) {
hay_respuesta = 0;
}
-void DrasculaEngine::pantalla_4(int fl) {
+void DrasculaEngine::pantalla_4(int fl) {
if (objeto_que_lleva == MOVER && fl == 189 && flags[34] == 0) {
hablar(TEXT327, "327.als");
agarra_objeto(13);
@@ -10064,7 +10064,7 @@ void DrasculaEngine::pantalla_4(int fl) {
}
void DrasculaEngine::pantalla_5(int fl) {
- if (objeto_que_lleva == MIRAR && fl == 136 && flags[8]==0) hablar(TEXT14, "14.als");
+ if (objeto_que_lleva == MIRAR && fl == 136 && flags[8]==0) hablar(TEXT14, "14.als");
else if (objeto_que_lleva == MOVER && fl == 136)
hablar(TEXT13, "13.als");
else if (objeto_que_lleva == ABRIR && fl == 136)
@@ -10088,7 +10088,7 @@ void DrasculaEngine::pantalla_5(int fl) {
void DrasculaEngine::pantalla_6(int fl){
if (objeto_que_lleva == MIRAR && fl==144) {
- hablar(TEXT41, "41.als");
+ hablar(TEXT41, "41.als");
hablar(TEXT42, "42.als");
} else if (objeto_que_lleva == COGER && fl == 144)
hablar(TEXT43, "43.als");
@@ -10101,7 +10101,7 @@ void DrasculaEngine::pantalla_6(int fl){
else if (objeto_que_lleva == HABLAR && fl == 138)
hablar(TEXT6, "6.als");
else if (objeto_que_lleva == MIRAR && fl == 143)
- hablar(TEXT37, "37.als");
+ hablar(TEXT37, "37.als");
else if (objeto_que_lleva == COGER && fl == 143)
hablar(TEXT7, "7.als");
else if (objeto_que_lleva == MOVER && fl == 143)
@@ -10124,14 +10124,14 @@ void DrasculaEngine::pantalla_6(int fl){
DIBUJA_BLOQUE(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla);
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
pausa(5);
- comienza_sound("s4.als");
+ comienza_sound("s4.als");
refresca_pantalla();
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
fin_sound();
} else if (objeto_que_lleva == HABLAR && fl == 143)
hablar(TEXT38, "38.als");
else if (objeto_que_lleva == MIRAR && fl == 139)
- hablar(TEXT36, "36.als");
+ hablar(TEXT36, "36.als");
else if (objeto_que_lleva == ABRIR && fl == 139 && flags[1] == 0) {
DIBUJA_FONDO(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
actualiza_refresco_antes();
@@ -10139,14 +10139,14 @@ void DrasculaEngine::pantalla_6(int fl){
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
pausa(19);
comienza_sound("s3.als");
- flags[1] = 1;
+ flags[1] = 1;
visible[4] = 1;
visible[2] = 0;
refresca_pantalla();
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
fin_sound();
} else if (objeto_que_lleva == MIRAR && fl == 140)
- hablar(TEXT147, "147.als");
+ hablar(TEXT147, "147.als");
else if (objeto_que_lleva == COGER && fl == 140) {
DIBUJA_FONDO(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
actualiza_refresco_antes();
@@ -10192,11 +10192,11 @@ void DrasculaEngine::pantalla_8(int fl) {
void DrasculaEngine::pantalla_9(int fl){
if (objeto_que_lleva == MIRAR && fl == 150)
- hablar(TEXT35, "35.als");
+ hablar(TEXT35, "35.als");
else if (objeto_que_lleva == HABLAR && fl == 150)
hablar(TEXT6, "6.als");
else if (objeto_que_lleva == MIRAR && fl == 51)
- hablar(TEXT60, "60.als");
+ hablar(TEXT60, "60.als");
else if (objeto_que_lleva == HABLAR && fl == 51 && flags[4] == 0)
animacion_4_2();
else if (objeto_que_lleva == HABLAR && fl == 51 && flags[4] == 1)
@@ -10211,7 +10211,7 @@ void DrasculaEngine::pantalla_9(int fl){
void DrasculaEngine::pantalla_12(int fl){
if (objeto_que_lleva == MIRAR && fl == 154)
- hablar(TEXT329, "329.als");
+ hablar(TEXT329, "329.als");
else if (objeto_que_lleva == HABLAR && fl == 154)
hablar(TEXT330, "330.als");
else if (objeto_que_lleva == MOVER && fl == 155)
@@ -10219,7 +10219,7 @@ void DrasculaEngine::pantalla_12(int fl){
else if (objeto_que_lleva == HABLAR && fl == 155)
hablar(TEXT331, "331.als");
else if (objeto_que_lleva == MIRAR && fl == 156)
- hablar(TEXT35, "35.als");
+ hablar(TEXT35, "35.als");
else if (objeto_que_lleva == MOVER && fl == 156)
hablar(TEXT48, "48.als");
else if (objeto_que_lleva == HABLAR && fl == 156)
@@ -10233,18 +10233,18 @@ void DrasculaEngine::pantalla_12(int fl){
}
void DrasculaEngine::pantalla_14(int fl) {
- if (objeto_que_lleva == HABLAR && fl == 54 && flags[39] == 0)
- animacion_12_2();
- else if (objeto_que_lleva == HABLAR && fl == 54 && flags[39] == 1)
- hablar(TEXT109, "109.als");
+ if (objeto_que_lleva == HABLAR && fl == 54 && flags[39] == 0)
+ animacion_12_2();
+ else if (objeto_que_lleva == HABLAR && fl == 54 && flags[39] == 1)
+ hablar(TEXT109, "109.als");
else if (objeto_que_lleva == 12 && fl == 54)
- animacion_26_2();
+ animacion_26_2();
else if (objeto_que_lleva == HABLAR && fl == 52 && flags[5] == 0)
- animacion_11_2();
+ animacion_11_2();
else if (objeto_que_lleva == HABLAR && fl == 52 && flags[5] == 1)
- animacion_36_2();
+ animacion_36_2();
else if (objeto_que_lleva == HABLAR && fl == 53)
- animacion_13_2();
+ animacion_13_2();
else if (objeto_que_lleva == MIRAR && fl == 200)
hablar(TEXT165, "165.als");
else if (objeto_que_lleva == MIRAR && fl == 201)
@@ -10267,15 +10267,15 @@ void DrasculaEngine::pantalla_14(int fl) {
void DrasculaEngine::pantalla_15(int fl) {
if (objeto_que_lleva == HABLAR && fl == 188)
- hablar(TEXT333, "333.als");
+ hablar(TEXT333, "333.als");
else if (objeto_que_lleva == MIRAR && fl == 188)
- hablar(TEXT334, "334.als");
+ hablar(TEXT334, "334.als");
else if (objeto_que_lleva == 19 && fl == 188 && flags[27] == 0)
- hablar(TEXT335, "335.als");
- else if (objeto_que_lleva == 19 && fl == 188 && flags[27] == 1) {
- hablar(TEXT336, "336.als");
+ hablar(TEXT335, "335.als");
+ else if (objeto_que_lleva == 19 && fl == 188 && flags[27] == 1) {
+ hablar(TEXT336, "336.als");
sentido_hare = 3;
- hablar(TEXT337, "337.als");
+ hablar(TEXT337, "337.als");
hablar_sinc(TEXT46, "46.als", "4442444244244");
sentido_hare = 1;
} else if (objeto_que_lleva == 18 && fl == 188 && flags[26] == 0) {
@@ -10316,7 +10316,7 @@ void DrasculaEngine::pantalla_16(int fl) {
else if (objeto_que_lleva == CERRAR && fl == 163)
cierra_puerta(17, 0);
else if (objeto_que_lleva == MIRAR && fl == 183)
- hablar(TEXT340, "340.als");
+ hablar(TEXT340, "340.als");
else if (objeto_que_lleva == HABLAR && fl == 183) {
hablar(TEXT341, "341.als");
pausa(10);
@@ -10336,7 +10336,7 @@ void DrasculaEngine::pantalla_16(int fl) {
} else if (objeto_que_lleva == CERRAR && fl == 183)
cierra_puerta(19, NO_PUERTA);
else if (objeto_que_lleva == MIRAR && fl == 185)
- hablar(TEXT37, "37.als");
+ hablar(TEXT37, "37.als");
else if (objeto_que_lleva == COGER && fl == 185)
hablar(TEXT7, "7.als");
else if (objeto_que_lleva == MOVER && fl == 185)
@@ -10344,11 +10344,11 @@ void DrasculaEngine::pantalla_16(int fl) {
else if (objeto_que_lleva == HABLAR && fl == 185)
hablar(TEXT38, "38.als");
else if (objeto_que_lleva == MIRAR && fl == 187) {
- hablar(TEXT343, "343.als");
+ hablar(TEXT343, "343.als");
sentido_hare = 3;
refresca_pantalla();
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
- hablar(TEXT344, "344.als");
+ hablar(TEXT344, "344.als");
} else if (objeto_que_lleva == HABLAR && fl == 187)
hablar(TEXT345, "345.als");
else
@@ -10357,7 +10357,7 @@ void DrasculaEngine::pantalla_16(int fl) {
void DrasculaEngine::pantalla_17(int fl) {
if (objeto_que_lleva == MIRAR && fl == 177)
- hablar(TEXT35, "35.als");
+ hablar(TEXT35, "35.als");
else if (objeto_que_lleva == HABLAR && fl == 177 && flags[18] == 0)
hablar(TEXT6, "6.als");
else if (objeto_que_lleva == HABLAR && fl == 177 && flags[18] == 1)
@@ -10381,11 +10381,11 @@ void DrasculaEngine::pantalla_17(int fl) {
void DrasculaEngine::pantalla_18(int fl) {
if (objeto_que_lleva == HABLAR && fl == 55 && flags[36] == 0)
- animacion_24_2();
+ animacion_24_2();
else if (objeto_que_lleva == HABLAR && fl == 55 && flags[36] == 1)
- hablar(TEXT109, "109.als");
+ hablar(TEXT109, "109.als");
else if (objeto_que_lleva == MIRAR && fl == 181)
- hablar(TEXT348, "348.als");
+ hablar(TEXT348, "348.als");
else if (objeto_que_lleva == COGER && fl == 182) {
DIBUJA_FONDO(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
actualiza_refresco_antes();
@@ -10393,8 +10393,8 @@ void DrasculaEngine::pantalla_18(int fl) {
actualiza_refresco();
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
pausa(4);
- agarra_objeto(12);
- visible[2] = 0;
+ agarra_objeto(12);
+ visible[2] = 0;
flags[28] = 1;
} else if (objeto_que_lleva == MIRAR && fl == 182)
hablar(TEXT154, "154.als");
@@ -10411,13 +10411,13 @@ void DrasculaEngine::pantalla_18(int fl) {
else if (objeto_que_lleva == 8 && fl == 55 && flags[38] == 1 && flags[33] == 1)
animacion_24_2();
else if (objeto_que_lleva == 13 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animacion_24_2();
+ animacion_24_2();
else if (objeto_que_lleva == 15 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animacion_24_2();
+ animacion_24_2();
else if (objeto_que_lleva == 16 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animacion_24_2();
+ animacion_24_2();
else if (objeto_que_lleva == 17 && fl == 55 && flags[38] == 1 && flags[33] == 1)
- animacion_24_2();
+ animacion_24_2();
else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0) {
sentido_hare = 3;
refresca_pantalla();
@@ -10429,8 +10429,8 @@ void DrasculaEngine::pantalla_18(int fl) {
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
pausa(6);
hablar(TEXT347, "347.als");
- flags[29] = 1;
- agarra_objeto(23);
+ flags[29] = 1;
+ agarra_objeto(23);
resta_objeto(11);
} else
hay_respuesta = 0;
@@ -10533,7 +10533,7 @@ bucless:
if (key != 0)
ctvd_stop();
buffer_teclado();
- if (hay_sb == 1) {
+ if (hay_sb == 1) {
if (LookForFree() != 0)
goto bucless;
delete sku;
@@ -10595,16 +10595,16 @@ bucless:
if (key != 0)
ctvd_stop();
buffer_teclado();
- if (hay_sb == 1) {
+ if (hay_sb == 1) {
if (LookForFree() != 0)
goto bucless;
delete sku;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud = longitud - 2;
if (longitud > 0)
goto bucless;
- }
+ }
flags[19] = cara_antes;
refresca_pantalla();
@@ -10649,7 +10649,7 @@ void DrasculaEngine::animacion_12_2() {
flags[11] = 1;
habla_pianista(TEXTP5, "P5.als");
- conversa("op_1.cal");
+ conversa("op_1.cal");
flags[11] = 0;
lee_dibujos("974.alg");
@@ -10763,7 +10763,7 @@ void DrasculaEngine::animacion_13_2() {
habla_borracho(TEXTB7, "B7.als");
flags[41] = 1;
}
- conversa("op_2.cal");
+ conversa("op_2.cal");
lee_dibujos("964.alg");
descomprime_dibujo(dir_hare_frente, 1);
@@ -10816,7 +10816,7 @@ void DrasculaEngine::animacion_24_2() {
if (flags[22] == 0)
conversa("op_4.cal");
else
- conversa("op_5.cal");
+ conversa("op_5.cal");
sal_de_la_habitacion(0);
flags[21] = 0;
@@ -11276,7 +11276,7 @@ void DrasculaEngine::animacion_5_2() {
x = x + 52;
pausa(3);
}
- fin_sound_corte();
+ fin_sound_corte();
x = 0;
@@ -11324,9 +11324,9 @@ void DrasculaEngine::animacion_6_2() {
pausa(1);
if (flags[4] == 1)
- habla_hacker(TEXTD66, "d66.als");
+ habla_hacker(TEXTD66, "d66.als");
pausa(6);
- habla_ciego(TEXTD78, "d78.als",
+ habla_ciego(TEXTD78, "d78.als",
"004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777");
pausa(4);
habla_hacker(TEXTD67, "d67.als");
@@ -11359,7 +11359,7 @@ void DrasculaEngine::animacion_33_2() {
flags[9] = 1;
pausa(12);
- hablar(TEXTD56, "d56.als" );
+ hablar(TEXTD56, "d56.als" );
pausa(8);
borra_pantalla();
@@ -11381,11 +11381,11 @@ void DrasculaEngine::animacion_33_2() {
habla_ciego(TEXTD68, "d68.als", "44472225500022227555544444472225500022227555544444664466");
pausa(5);
- habla_hacker(TEXTD57, "d57.als");
+ habla_hacker(TEXTD57, "d57.als");
pausa(6);
_system->delayMillis(1000);
habla_ciego(TEXTD77, "d77.als", "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444");
- habla_hacker(TEXTD65, "d65.als");
+ habla_hacker(TEXTD65, "d65.als");
DIBUJA_FONDO(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla);
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
@@ -11413,9 +11413,9 @@ void DrasculaEngine::animacion_33_2() {
bool DrasculaEngine::pantalla_21(int fl) {
if (objeto_que_lleva == ABRIR && fl == 101 && flags[28] == 0)
- hablar(TEXT419, "419.als");
+ hablar(TEXT419, "419.als");
else if (objeto_que_lleva == ABRIR && fl == 101 && flags[28] == 1)
- abre_puerta(0, 1);
+ abre_puerta(0, 1);
else if (objeto_que_lleva == CERRAR && fl == 101)
cierra_puerta(0, 1);
else if(objeto_que_lleva == COGER && fl == 141) {
@@ -11455,11 +11455,11 @@ void DrasculaEngine::pantalla_22(int fl) {
hablar(TEXT499, "499.als");
hablar(TEXT500, "500.als");
} else if (objeto_que_lleva == MIRAR && fl == 52)
- hablar(TEXT497, "497.als");
+ hablar(TEXT497, "497.als");
else if (objeto_que_lleva == HABLAR && fl == 52)
- hablar(TEXT498, "498.als");
+ hablar(TEXT498, "498.als");
else if (objeto_que_lleva == COGER && fl == 180 && flags[26] == 0)
- hablar(TEXT420, "420.als");
+ hablar(TEXT420, "420.als");
else if (objeto_que_lleva == COGER && fl == 180 && flags[26] == 1) {
agarra_objeto(7);
visible[3] = 0;
@@ -11476,7 +11476,7 @@ void DrasculaEngine::pantalla_23(int fl) {
cierra_puerta(0, 0);
actualiza_datos();
} else if(objeto_que_lleva == ABRIR && fl == 104)
- abre_puerta(1, 1);
+ abre_puerta(1, 1);
else if(objeto_que_lleva == CERRAR && fl == 104)
cierra_puerta(1, 1);
else if(objeto_que_lleva == COGER && fl == 142) {
@@ -11493,11 +11493,11 @@ void DrasculaEngine::pantalla_23(int fl) {
void DrasculaEngine::pantalla_24(int fl) {
if (objeto_que_lleva == ABRIR && fl == 105)
- abre_puerta(1, 0);
+ abre_puerta(1, 0);
else if (objeto_que_lleva == CERRAR && fl == 105)
cierra_puerta(1, 0);
else if (objeto_que_lleva == ABRIR && fl == 106)
- abre_puerta(2, 1);
+ abre_puerta(2, 1);
else if (objeto_que_lleva == CERRAR && fl == 106)
cierra_puerta(2, 1);
else if (objeto_que_lleva == MIRAR && fl == 151)
@@ -11508,9 +11508,9 @@ void DrasculaEngine::pantalla_24(int fl) {
void DrasculaEngine::pantalla_26(int fl) {
if (objeto_que_lleva == ABRIR && fl == 107 && flags[30] == 0)
- abre_puerta(2, 0);
+ abre_puerta(2, 0);
else if (objeto_que_lleva == ABRIR && fl == 107 && flags[30] == 1)
- hablar(TEXT421, "421.als");
+ hablar(TEXT421, "421.als");
else if (objeto_que_lleva == CERRAR && fl == 107)
cierra_puerta(2, 0);
else if (objeto_que_lleva == 10 && fl == 50 && flags[18] == 1 && flags[12] == 1)
@@ -11525,7 +11525,7 @@ void DrasculaEngine::pantalla_26(int fl) {
lleva_al_hare(260, 180);
agarra_objeto(10);
visible[1] = 0;
- flags[12] = 1;
+ flags[12] = 1;
cierra_puerta(2, 0);
sentido_hare = 2;
habla_igorpuerta(TEXTI27, "I27.als");
@@ -11542,70 +11542,70 @@ void DrasculaEngine::pantalla_26(int fl) {
} else if (objeto_que_lleva == HABLAR && fl == 51)
animacion_1_4();
else if (objeto_que_lleva == ABRIR && fl == 167)
- hablar(TEXT467, "467.als");
+ hablar(TEXT467, "467.als");
else if (objeto_que_lleva == MIRAR && fl == 164)
- hablar(TEXT470, "470.als");
+ hablar(TEXT470, "470.als");
else if (objeto_que_lleva == ABRIR && fl == 164)
- hablar(TEXT471, "471.als");
+ hablar(TEXT471, "471.als");
else if (objeto_que_lleva == MIRAR && fl == 163)
- hablar(TEXT472, "472.als");
+ hablar(TEXT472, "472.als");
else if (objeto_que_lleva == COGER && fl == 163)
- hablar(TEXT473, "473.als");
+ hablar(TEXT473, "473.als");
else if (objeto_que_lleva == MIRAR && fl == 165)
- hablar(TEXT474, "474.als");
+ hablar(TEXT474, "474.als");
else if (objeto_que_lleva == MIRAR && fl == 168)
- hablar(TEXT476, "476.als");
+ hablar(TEXT476, "476.als");
else if (objeto_que_lleva == COGER && fl == 168)
- hablar(TEXT477, "477.als");
+ hablar(TEXT477, "477.als");
else
hay_respuesta = 0;
}
void DrasculaEngine::pantalla_27(int fl) {
if (objeto_que_lleva == ABRIR && fl == 110)
- abre_puerta(6, 1);
+ abre_puerta(6, 1);
else if (objeto_que_lleva == CERRAR && fl == 110)
cierra_puerta(6, 1);
else if (objeto_que_lleva == ABRIR && fl == 116 && flags[23] == 0)
hablar(TEXT419, "419.als");
else if (objeto_que_lleva == ABRIR && fl == 116 && flags[23] == 1)
- abre_puerta(5, 3);
+ abre_puerta(5, 3);
else if (objeto_que_lleva == 17 && fl == 116) {
flags[23] = 1;
abre_puerta(5,3);
sin_verbo();
} else if (objeto_que_lleva == MIRAR && fl == 175)
- hablar(TEXT429, "429.als");
+ hablar(TEXT429, "429.als");
else if (fl == 150)
- hablar(TEXT460, "460.als");
+ hablar(TEXT460, "460.als");
else
hay_respuesta = 0;
}
void DrasculaEngine::pantalla_29(int fl) {
if (objeto_que_lleva == ABRIR && fl == 114)
- abre_puerta(4, 1);
+ abre_puerta(4, 1);
else if (objeto_que_lleva == CERRAR && fl == 114)
- cierra_puerta(4, 1);
+ cierra_puerta(4, 1);
else if (objeto_que_lleva == MIRAR && fl == 152)
- hablar(TEXT463, "463.als");
+ hablar(TEXT463, "463.als");
else if (objeto_que_lleva == ABRIR && fl == 152)
- hablar(TEXT464, "464.als");
+ hablar(TEXT464, "464.als");
else if (objeto_que_lleva == MIRAR && fl == 153)
- hablar(TEXT465, "465.als");
+ hablar(TEXT465, "465.als");
else if (objeto_que_lleva == COGER && fl == 154)
- hablar(TEXT466, "466.als");
+ hablar(TEXT466, "466.als");
else if (objeto_que_lleva == ABRIR && fl == 156)
- hablar(TEXT467, "467.als");
+ hablar(TEXT467, "467.als");
else
hay_respuesta = 0;
}
void DrasculaEngine::pantalla_30(int fl) {
if (objeto_que_lleva == ABRIR && fl == 115)
- abre_puerta(4, 0);
+ abre_puerta(4, 0);
else if (objeto_que_lleva == CERRAR && fl == 115)
- cierra_puerta(4, 0);
+ cierra_puerta(4, 0);
else if (objeto_que_lleva == ABRIR && fl == 144 && flags[19] == 0)
hablar(TEXT422, "422.als");
else if (objeto_que_lleva == ABRIR && fl == 144 && flags[19] == 1 && flags[22] == 1)
@@ -11620,14 +11620,14 @@ void DrasculaEngine::pantalla_30(int fl) {
if (flags[18] == 1)
animacion_6_2();
} else if (objeto_que_lleva == CERRAR && fl == 144)
- cierra_puerta(16, 1);
+ cierra_puerta(16, 1);
else if (objeto_que_lleva == 13 && fl == 144) {
hablar(TEXT424, "424.als");
flags[19] = 1;
} else if (objeto_que_lleva == ABRIR && fl == 157)
- hablar(TEXT468, "468.als");
+ hablar(TEXT468, "468.als");
else if (objeto_que_lleva == MIRAR && fl == 158)
- hablar(TEXT469, "469.als");
+ hablar(TEXT469, "469.als");
else
hay_respuesta = 0;
}
@@ -11638,26 +11638,26 @@ void DrasculaEngine::pantalla_31(int fl) {
visible[1] = 0;
flags[13] = 1;
} else if (objeto_que_lleva == ABRIR && fl == 117)
- abre_puerta(5, 0);
+ abre_puerta(5, 0);
else if (objeto_que_lleva == CERRAR && fl == 117)
- cierra_puerta(5, 0);
+ cierra_puerta(5, 0);
else if (objeto_que_lleva == MIRAR && fl == 161)
- hablar(TEXT470, "470.als");
+ hablar(TEXT470, "470.als");
else if (objeto_que_lleva == ABRIR && fl == 161)
- hablar(TEXT471, "471.als");
+ hablar(TEXT471, "471.als");
else
hay_respuesta = 0;
}
void DrasculaEngine::pantalla_34(int fl) {
if (objeto_que_lleva == MOVER && fl == 146)
- animacion_8_4();
+ animacion_8_4();
else if (objeto_que_lleva == MIRAR && fl == 146)
hablar(TEXT458, "458.als");
else if (objeto_que_lleva == COGER && fl == 146)
hablar(TEXT459, "459.als");
else if (objeto_que_lleva == ABRIR && fl == 120 && flags[25] == 1)
- abre_puerta(8, 2);
+ abre_puerta(8, 2);
else if (objeto_que_lleva == ABRIR && fl == 120 && flags[25] == 0) {
abre_puerta(8, 2);
sentido_hare = 3;
@@ -11696,7 +11696,7 @@ void DrasculaEngine::pantalla_35(int fl) {
void DrasculaEngine::pantalla_44(int fl) {
if (objeto_que_lleva == MIRAR && fl == 172)
- hablar(TEXT428, "428.als");
+ hablar(TEXT428, "428.als");
else
hay_respuesta = 0;
}
@@ -11716,7 +11716,7 @@ void DrasculaEngine::habla_igorpuerta(const char *dicho, const char *filename) {
color_abc(BLANCO);
- if (hay_sb == 1){
+ if (hay_sb == 1){
sku = new Common::File;
sku->open(filename);
if (!sku->isOpen()) {
@@ -11738,13 +11738,13 @@ bucless:
if (key != 0)
ctvd_stop();
buffer_teclado();
- if (hay_sb == 1) {
+ if (hay_sb == 1) {
if (LookForFree() != 0)
goto bucless;
delete sku;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud = longitud - 2;
if (longitud > 0)
goto bucless;
}
@@ -11771,7 +11771,7 @@ void DrasculaEngine::habla_igor_peluca(const char *dicho, const char *filename)
color_abc(BLANCO);
- if (hay_sb == 1){
+ if (hay_sb == 1){
sku = new Common::File;
sku->open(filename);
if (!sku->isOpen()) {
@@ -11805,16 +11805,16 @@ bucless:
if (key != 0)
ctvd_stop();
buffer_teclado();
- if (hay_sb == 1){
+ if (hay_sb == 1){
if (LookForFree() != 0)
goto bucless;
delete sku;
ctvd_terminate();
} else {
- longitud = longitud - 2;
+ longitud = longitud - 2;
if (longitud > 0)
goto bucless;
- }
+ }
refresca_pantalla();
VUELCA_PANTALLA(0, 0, 0, 0, 320, 200, dir_zona_pantalla);
diff --git a/engines/gob/coktelvideo.h b/engines/gob/coktelvideo.h
index 936b92c8f1..2b67f649f6 100644
--- a/engines/gob/coktelvideo.h
+++ b/engines/gob/coktelvideo.h
@@ -74,7 +74,7 @@ public:
struct State {
/** Left-most value of the updated rectangle. */
int16 left;
- /** Top-most value of the updated rectangle. */
+ /** Top-most value of the updated rectangle. */
int16 top;
/** Right-most value of the updated rectangle. */
int16 right;
@@ -231,7 +231,7 @@ protected:
Audio::AppendableAudioStream *_audioStream;
Audio::SoundHandle _audioHandle;
-
+
uint32 _frameLength;
uint32 _lastFrameTime;
diff --git a/engines/gob/game.h b/engines/gob/game.h
index 89877668c9..5cf5e1bea6 100644
--- a/engines/gob/game.h
+++ b/engines/gob/game.h
@@ -215,7 +215,7 @@ protected:
byte *_variablesSizesArray[5];
GobEngine *_vm;
-
+
int16 adjustKey(int16 key);
byte *loadLocTexts(int32 *dataSize = 0);
diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp
index bf07551569..df5811150e 100644
--- a/engines/gob/goblin.cpp
+++ b/engines/gob/goblin.cpp
@@ -1757,7 +1757,7 @@ void Goblin::setState(int16 index, int16 state) {
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop) -
(obj->goblinY + 1) / 2;
} else {
- *obj->pPosY = (obj->goblinY + 1) * _vm->_map->_tilesHeight -
+ *obj->pPosY = (obj->goblinY + 1) * _vm->_map->_tilesHeight -
(_vm->_scenery->_animBottom - _vm->_scenery->_animTop);
}
*obj->pPosX = obj->goblinX * _vm->_map->_tilesWidth;
@@ -1849,7 +1849,7 @@ void Goblin::move(int16 destX, int16 destY, int16 objIndex) {
mouseY = _vm->_global->_inter_mouseY;
if (_vm->_map->_bigTiles)
mouseY += ((_vm->_global->_inter_mouseY / _vm->_map->_tilesHeight) + 1) / 2;
-
+
gobDestX = mouseX / _vm->_map->_tilesWidth;
gobDestY = mouseY / _vm->_map->_tilesHeight;
diff --git a/engines/gob/map.h b/engines/gob/map.h
index ac9f0d48a8..8a94de8da9 100644
--- a/engines/gob/map.h
+++ b/engines/gob/map.h
@@ -133,7 +133,7 @@ public:
return _passMap[y * _mapWidth + x];
}
-
+
virtual void setPass(int x, int y, int8 pass, int heightOff = -1) {
if (!_passMap)
return;
@@ -167,7 +167,7 @@ public:
heightOff = _passWidth;
return _passMap[y * heightOff + x];
}
-
+
virtual void setPass(int x, int y, int8 pass, int heightOff = -1) {
if (!_passMap)
return;
diff --git a/engines/gob/module.mk b/engines/gob/module.mk
index b51de90656..8a428b4d34 100644
--- a/engines/gob/module.mk
+++ b/engines/gob/module.mk
@@ -59,5 +59,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/gob/mult.h b/engines/gob/mult.h
index b3fa892f34..90f6e61f9a 100644
--- a/engines/gob/mult.h
+++ b/engines/gob/mult.h
@@ -197,7 +197,7 @@ public:
int16 sndSlotsCount;
int16 sndSlot[60];
- int16 frameRate;
+ int16 frameRate;
Video::Color fadePal[5][16];
int16 animObjs[4][4];
diff --git a/engines/gob/music.h b/engines/gob/music.h
index 80dbc49167..199ea515b0 100644
--- a/engines/gob/music.h
+++ b/engines/gob/music.h
@@ -63,7 +63,7 @@ public:
bool endOfData() const { return !_playing; }
bool endOfStream() const { return false; }
int getRate() const { return _rate; }
-
+
protected:
static const char *_tracks[][2];
static const char *_trackFiles[];
diff --git a/engines/gob/parse.h b/engines/gob/parse.h
index 61c3763ce4..7d451b5f79 100644
--- a/engines/gob/parse.h
+++ b/engines/gob/parse.h
@@ -36,7 +36,7 @@ public:
virtual int16 parseVarIndex(void) = 0;
virtual int16 parseValExpr(byte stopToken = 99) = 0;
virtual int16 parseExpr(byte stopToken, byte *resultPtr) = 0;
-
+
Parse(GobEngine *vm);
virtual ~Parse() {}
diff --git a/engines/gob/scenery.h b/engines/gob/scenery.h
index 800d0dbd2b..290d67d2d5 100644
--- a/engines/gob/scenery.h
+++ b/engines/gob/scenery.h
@@ -120,13 +120,13 @@ public:
void updateAnim(int16 layer, int16 frame, int16 animation,
int16 flags, int16 drawDeltaX, int16 drawDeltaY, char doDraw);
- void writeAnimLayerInfo(uint16 index, uint16 layer,
+ void writeAnimLayerInfo(uint16 index, uint16 layer,
int16 varDX, int16 varDY, int16 varUnk0, int16 varFrames);
int16 getStaticLayersCount(uint16 index);
int16 getAnimLayersCount(uint16 index);
StaticLayer *getStaticLayer(uint16 index, uint16 layer);
AnimLayer *getAnimLayer(uint16 index, uint16 layer);
-
+
virtual int16 loadAnim(char search);
Scenery(GobEngine *vm);
diff --git a/engines/gob/sound.h b/engines/gob/sound.h
index b2691b2ce6..6780c201b5 100644
--- a/engines/gob/sound.h
+++ b/engines/gob/sound.h
@@ -71,7 +71,7 @@ public:
uint32 fadeSize = fade ? _size / 2 : 0;
return ((_size * repCount - fadeSize) * 1000) / frequency;
}
-
+
SoundDesc() : _data(0), _dataPtr(0), _size(0), _type(SOUND_SND),
_source(SOUND_FILE), _repCount(0), _frequency(0),
_flag(0), _id(0) {}
@@ -129,7 +129,7 @@ protected:
Audio::SoundHandle *_activeHandle;
Audio::SoundHandle _compositionHandle;
-
+
SoundDesc *_compositionSamples;
int8 _compositionSampleCount;
int16 _composition[50];
diff --git a/engines/igor/parts/part_05.cpp b/engines/igor/parts/part_05.cpp
index 08ebf31481..a336468a11 100644
--- a/engines/igor/parts/part_05.cpp
+++ b/engines/igor/parts/part_05.cpp
@@ -125,7 +125,7 @@ void IgorEngine::PART_05_ACTION_103() {
_objectsState[60] = 1;
if (_game.version == kIdEngDemo110) {
++_demoActionsCounter;
- }
+ }
PART_05_HELPER_4(255);
}
diff --git a/engines/igor/parts/part_17.cpp b/engines/igor/parts/part_17.cpp
index 3e60e2f144..e4b227307e 100644
--- a/engines/igor/parts/part_17.cpp
+++ b/engines/igor/parts/part_17.cpp
@@ -504,7 +504,7 @@ void IgorEngine::PART_17() {
while (_currentPart >= 170 && _currentPart <= 171) {
runPartLoop();
}
- leavePartLoop();
+ leavePartLoop();
if (_objectsState[55] == 1) {
_objectsState[56] = 1;
}
diff --git a/engines/igor/parts/part_21.cpp b/engines/igor/parts/part_21.cpp
index 8e5ffb795a..ef284208a8 100644
--- a/engines/igor/parts/part_21.cpp
+++ b/engines/igor/parts/part_21.cpp
@@ -205,7 +205,7 @@ void IgorEngine::PART_21_ACTION_111() {
PART_21_HELPER_1(255);
if (_game.version == kIdEngDemo110) {
++_demoActionsCounter;
- }
+ }
ADD_DIALOGUE_TEXT(210, 2);
SET_DIALOGUE_TEXT(1, 1);
startIgorDialogue();
@@ -468,7 +468,7 @@ void IgorEngine::PART_21() {
PART_21_HELPER_3();
} else if (_currentPart == 212) {
PART_21_HELPER_4();
- }
+ }
enterPartLoop();
while (_currentPart >= 210 && _currentPart <= 212) {
runPartLoop();
diff --git a/engines/kyra/animator_v1.h b/engines/kyra/animator_v1.h
index 04965875c0..7bfb872651 100644
--- a/engines/kyra/animator_v1.h
+++ b/engines/kyra/animator_v1.h
@@ -84,7 +84,7 @@ public:
void clearQueue() { _objectQueue = 0; }
void addObjectToQueue(AnimObject *object);
void refreshObject(AnimObject *object);
-
+
void makeBrandonFaceMouse();
void setBrandonAnimSeqSize(int width, int height);
void resetBrandonAnimSeqSize();
@@ -124,7 +124,7 @@ protected:
int _brandonAnimSeqSizeWidth;
int _brandonAnimSeqSizeHeight;
-
+
};
} // end of namespace Kyra
diff --git a/engines/kyra/animator_v2.cpp b/engines/kyra/animator_v2.cpp
index 1662534ab9..0d4bdf3328 100644
--- a/engines/kyra/animator_v2.cpp
+++ b/engines/kyra/animator_v2.cpp
@@ -30,7 +30,7 @@ namespace Kyra {
void KyraEngine_v2::clearAnimObjects() {
memset(_animObjects, 0, sizeof(_animObjects));
-
+
_animObjects[0].index = 0;
_animObjects[0].type = 0;
_animObjects[0].enabled = 1;
@@ -39,12 +39,12 @@ void KyraEngine_v2::clearAnimObjects() {
_animObjects[0].height = 49;
_animObjects[0].width2 = 4;
_animObjects[0].height2 = 10;
-
+
for (int i = 1; i < 11; ++i) {
_animObjects[i].index = i;
_animObjects[i].type = 2;
}
-
+
for (int i = 11; i <= 40; ++i) {
_animObjects[i].index = i;
_animObjects[i].type = 1;
@@ -74,7 +74,7 @@ KyraEngine_v2::AnimObj *KyraEngine_v2::addToAnimListSorted(AnimObj *list, AnimOb
prev = cur;
cur = temp;
}
-
+
if (add->yPos1 <= cur->yPos1) {
prev->nextObject = add;
add->nextObject = cur;
@@ -126,11 +126,11 @@ void KyraEngine_v2::drawAnimObjects() {
for (AnimObj *curObject = _animList; curObject; curObject = curObject->nextObject) {
if (!curObject->enabled)
continue;
-
+
int x = curObject->xPos2 - (_screen->getScreenDim(2)->sx << 3);
int y = curObject->yPos2 - _screen->getScreenDim(2)->sy;
int layer = 7;
-
+
if (curObject->flags & 0x800) {
if (curObject->animFlags)
layer = 0;
@@ -170,11 +170,11 @@ void KyraEngine_v2::refreshAnimObjects(int force) {
width -= width + x - 322;
if (height + y > 143)
height -= height + y - 144;
-
+
_screen->hideMouse();
_screen->copyRegion(x, y, x, y, width, height, 2, 0, Screen::CR_CLIPPED);
_screen->showMouse();
-
+
curObject->needRefresh = false;
}
}
@@ -247,37 +247,37 @@ void KyraEngine_v2::updateSceneAnim(int anim, int newFrame) {
AnimObj *animObject = &_animObjects[1+anim];
if (!animObject->enabled)
return;
-
+
animObject->needRefresh = 1;
animObject->unk8 = 1;
animObject->flags = 0;
-
+
if (_sceneAnims[anim].flags & 2)
animObject->flags |= 0x800;
else
animObject->flags &= ~0x800;
-
+
if (_sceneAnims[anim].flags & 4)
animObject->flags |= 1;
else
animObject->flags &= ~1;
-
+
if (_sceneAnims[anim].flags & 0x20) {
animObject->shapePtr = _sceneShapeTable[newFrame];
animObject->shapeIndex2 = 0xFFFF;
animObject->shapeIndex3 = 0xFFFF;
- animObject->animNum = 0xFFFF;
+ animObject->animNum = 0xFFFF;
} else {
animObject->shapePtr = 0;
animObject->shapeIndex3 = newFrame;
animObject->animNum = anim;
}
-
+
animObject->xPos1 = _sceneAnims[anim].x;
animObject->yPos1 = _sceneAnims[anim].y;
animObject->xPos2 = _sceneAnims[anim].x2;
animObject->yPos2 = _sceneAnims[anim].y2;
-
+
if (_sceneAnims[anim].flags & 2) {
_animList = deleteAnimListEntry(_animList, animObject);
if (!_animList)
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 463e66f253..d44fcb3b81 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -241,7 +241,7 @@ bool Debugger_v2::cmd_enterScene(int argc, const char **argv) {
if (argc > 1) {
int scene = atoi(argv[1]);
- // game will crash if entering a non-existent scene
+ // game will crash if entering a non-existent scene
if (scene >= _vm->_sceneListSize) {
DebugPrintf("scene number must be any value between (including) 0 and %d\n", _vm->_sceneListSize-1);
return true;
diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp
index 6c9b822955..e7161e8fcd 100644
--- a/engines/kyra/gui_v1.cpp
+++ b/engines/kyra/gui_v1.cpp
@@ -122,7 +122,7 @@ int KyraEngine_v1::buttonAmuletCallback(Button *caller) {
}
if (queryGameFlag(0xF1)) {
assert(_waitForAmulet);
- characterSays(2001, _waitForAmulet[0], 0, -2);
+ characterSays(2001, _waitForAmulet[0], 0, -2);
return 1;
}
if (!queryGameFlag(0x55+jewel)) {
@@ -135,18 +135,18 @@ int KyraEngine_v1::buttonAmuletCallback(Button *caller) {
drawJewelPress(jewel, 0);
drawJewelsFadeOutStart();
drawJewelsFadeOutEnd(jewel);
-
+
_scriptInterpreter->initScript(_scriptClick, _scriptClickData);
_scriptClick->regs[3] = 0;
_scriptClick->regs[6] = jewel;
_scriptInterpreter->startScript(_scriptClick, 4);
-
+
while (_scriptInterpreter->validScript(_scriptClick))
_scriptInterpreter->runScript(_scriptClick);
-
+
if (_scriptClick->regs[3])
return 1;
-
+
_unkAmuletVar = 1;
switch (jewel-1) {
case 0:
@@ -158,7 +158,7 @@ int KyraEngine_v1::buttonAmuletCallback(Button *caller) {
characterSays(2003, _healingTip[0], 0, -2);
}
break;
-
+
case 1:
seq_makeBrandonInv();
break;
@@ -192,7 +192,7 @@ int KyraEngine_v1::buttonAmuletCallback(Button *caller) {
assert(_magicJewelString);
characterSays(2007, _magicJewelString[0], 0, -2);
break;
-
+
default:
break;
}
@@ -213,7 +213,7 @@ void KyraEngine_v1::processButtonList(Button *list) {
list = list->nextButton;
continue;
}
-
+
int x = list->x;
int y = list->y;
assert(list->dimTableIndex < _screen->_screenDimTableCount);
@@ -221,12 +221,12 @@ void KyraEngine_v1::processButtonList(Button *list) {
x += _screen->_screenDimTable[list->dimTableIndex].w << 3;
}
x += _screen->_screenDimTable[list->dimTableIndex].sx << 3;
-
+
if (y < 0) {
y += _screen->_screenDimTable[list->dimTableIndex].h;
}
y += _screen->_screenDimTable[list->dimTableIndex].sy;
-
+
Common::Point mouse = getMousePos();
if (mouse.x >= x && mouse.y >= y && x + list->width >= mouse.x && y + list->height >= mouse.y) {
int processMouseClick = 0;
@@ -248,7 +248,7 @@ void KyraEngine_v1::processButtonList(Button *list) {
} else if (_mousePressFlag) {
processMouseClick = 1;
}
-
+
if (processMouseClick) {
if (list->buttonCallback) {
if ((this->*(list->buttonCallback))(list)) {
@@ -269,7 +269,7 @@ void KyraEngine_v1::processButtonList(Button *list) {
list = list->nextButton;
continue;
}
-
+
list = list->nextButton;
}
}
@@ -277,11 +277,11 @@ void KyraEngine_v1::processButtonList(Button *list) {
void KyraEngine_v1::processButton(Button *button) {
if (!button)
return;
-
+
int processType = 0;
uint8 *shape = 0;
Button::ButtonCallback callback = 0;
-
+
int flags = (button->flags2 & 5);
if (flags == 1) {
processType = button->process2;
@@ -302,16 +302,16 @@ void KyraEngine_v1::processButton(Button *button) {
else if (processType == 4)
callback = button->process0PtrCallback;
}
-
+
int x = button->x;
int y = button->y;
assert(button->dimTableIndex < _screen->_screenDimTableCount);
if (x < 0)
x += _screen->_screenDimTable[button->dimTableIndex].w << 3;
-
+
if (y < 0)
y += _screen->_screenDimTable[button->dimTableIndex].h;
-
+
if (processType == 1 && shape)
_screen->drawShape(_screen->_curPage, shape, x, y, button->dimTableIndex, 0x10);
else if (processType == 4 && callback)
@@ -370,7 +370,7 @@ int KyraEngine_v1::drawBoxCallback(Button *button) {
int KyraEngine_v1::drawShadedBoxCallback(Button *button) {
if (!_displayMenu)
return 0;
-
+
_screen->hideMouse();
_screen->drawShadedBox(button->x, button->y, button->x + button->width, button->y + button->height, 0xf9, 0xfa);
_screen->showMouse();
@@ -386,7 +386,7 @@ void KyraEngine_v1::setGUILabels() {
int walkspeedGarbageOffset = 36;
int menuLabelGarbageOffset = 0;
-
+
if (_flags.isTalkie) {
if (_flags.lang == Common::EN_ANY)
offset = 52;
@@ -409,7 +409,7 @@ void KyraEngine_v1::setGUILabels() {
}
assert(offset + 27 < _guiStringsSize);
-
+
// The Legend of Kyrandia
_menu[0].menuName = _guiStrings[0];
// Load a Game
@@ -425,7 +425,7 @@ void KyraEngine_v1::setGUILabels() {
// Cancel
_menu[2].item[5].itemString = _guiStrings[10];
-
+
// Enter a description of your saved game:
_menu[3].menuName = _guiStrings[11];
// Save
@@ -439,14 +439,14 @@ void KyraEngine_v1::setGUILabels() {
_menu[4].item[0].itemString = _guiStrings[1];
// Quit playing
_menu[4].item[1].itemString = _guiStrings[4];
-
+
// Game Controls
_menu[5].menuName = _guiStrings[6];
// Yes
_menu[1].item[0].itemString = _guiStrings[22 + offset];
// No
_menu[1].item[1].itemString = _guiStrings[23 + offset];
-
+
// Music is
_menu[5].item[0].labelString = _guiStrings[26 + offsetOptions];
// Sounds are
@@ -457,7 +457,7 @@ void KyraEngine_v1::setGUILabels() {
_menu[5].item[4].labelString = _guiStrings[25 + offsetOptions];
// Main Menu
_menu[5].item[5].itemString = &_guiStrings[19 + offsetMainMenu][menuLabelGarbageOffset];
-
+
if (_flags.isTalkie)
// Text & Voice
_voiceTextString = _guiStrings[28 + offset];
@@ -473,7 +473,7 @@ int KyraEngine_v1::buttonMenuCallback(Button *caller) {
assert(_guiStrings);
assert(_configStrings);
-
+
/*
for (int i = 0; i < _guiStringsSize; i++)
debug("GUI string %i: %s", i, _guiStrings[i]);
@@ -481,7 +481,7 @@ int KyraEngine_v1::buttonMenuCallback(Button *caller) {
for (int i = 0; i < _configStringsSize; i++)
debug("Config string %i: %s", i, _configStrings[i]);
*/
-
+
setGUILabels();
if (_currentCharacter->sceneId == 210 && _deathHandler == 0xFF) {
snd_playSoundEffect(0x36);
@@ -505,7 +505,7 @@ int KyraEngine_v1::buttonMenuCallback(Button *caller) {
_menuRestoreScreen = true;
_keyPressed.reset();
_mousePressFlag = false;
-
+
_toplevelMenu = 0;
if (_menuDirectlyToLoad) {
gui_loadGameMenu(0);
@@ -558,7 +558,7 @@ void KyraEngine_v1::initMenu(Menu &menu) {
_text->printText(menu.menuName, textX - 1, textY + 1, 12, 248, 0);
_text->printText(menu.menuName, textX, textY, menu.textColor, 0, 0);
- int x1, y1, x2, y2;
+ int x1, y1, x2, y2;
for (int i = 0; i < menu.nrOfItems; i++) {
if (!menu.item[i].enabled)
continue;
@@ -618,7 +618,7 @@ void KyraEngine_v1::initMenu(Menu &menu) {
_scrollUpButton.nextButton = 0;
_menuButtonList = initButton(_menuButtonList, &_scrollUpButton);
processMenuButton(&_scrollUpButton);
-
+
_scrollDownButton.x = menu.scrollDownBtnX + menu.x;
_scrollDownButton.y = menu.scrollDownBtnY + menu.y;
_scrollDownButton.buttonCallback = &KyraEngine_v1::gui_scrollDown;
@@ -638,12 +638,12 @@ void KyraEngine_v1::calcCoords(Menu &menu) {
int widthBackup = _screen->_charWidth;
_screen->_charWidth = -2;
-
+
menu.x = (320 - menu.width)/2;
- int menu_x2 = menu.width + menu.x - 1;
+ int menu_x2 = menu.width + menu.x - 1;
int maxOffset = 0;
- int x1, x2, y1, y2;
+ int x1, x2, y1, y2;
for (int i = 0; i < menu.nrOfItems; i++) {
if (menu.item[i].x == -1)
@@ -665,18 +665,18 @@ void KyraEngine_v1::calcCoords(Menu &menu) {
maxOffset = offset;
}
}
-
+
if (menu.item[i].itemString) {
int textWidth = _screen->getTextWidth(menu.item[i].itemString) + 15;
if (menu.item[i].width < textWidth) {
menu.item[i].width = textWidth;
-
+
if ( menu.x + menu.item[i].x + menu.item[i].width > menu_x2)
menu.item[i].x -= (menu.x + menu.item[i].x + menu.item[i].width) - menu_x2 + 10;
}
- }
-
+ }
+
}
if (maxOffset > 0) {
@@ -687,7 +687,7 @@ void KyraEngine_v1::calcCoords(Menu &menu) {
}
menu.width += maxOffset;
}
-
+
if (menu.menuName != 0) {
int menuNameLength = _screen->getTextWidth(menu.menuName);
if (menuNameLength > menu.width)
@@ -698,10 +698,10 @@ void KyraEngine_v1::calcCoords(Menu &menu) {
menu.width = 310;
menu.x = (320 - menu.width)/2;
-
+
if (menu.y == -1)
menu.y = (200 - menu.height)/2;
-
+
_screen->_charWidth = widthBackup;
}
@@ -1030,7 +1030,7 @@ bool KyraEngine_v1::gui_quitConfirm(const char *str) {
_menu[1].menuName = str;
calcCoords(_menu[1]);
initMenu(_menu[1]);
-
+
_displaySubMenu = true;
_cancelSubMenu = true;
@@ -1162,7 +1162,7 @@ void KyraEngine_v1::gui_setupControls(Menu &menu) {
if (_flags.isTalkie) {
textControl = 4;
clickableOffset = 11;
-
+
if (_configVoice == 0)
_menu[5].item[4].enabled = 1;
else
@@ -1297,7 +1297,7 @@ void KyraEngine_v1::gui_processHighlights(Menu &menu) {
if (mouse.x > x1 && mouse.x < x2 &&
mouse.y > y1 && mouse.y < y2) {
-
+
if (menu.highlightedItem != i) {
if (menu.item[menu.highlightedItem].enabled )
gui_redrawText(menu);
@@ -1410,4 +1410,4 @@ void KyraEngine_v1::drawAmulet() {
}
} // end of namespace Kyra
-
+
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 2e795dfb08..4c5fb8d840 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -53,16 +53,16 @@ bool KyraEngine_v2::gui_mainMenuGetInput() {
int KyraEngine_v2::gui_handleMainMenu() {
debugC(9, kDebugLevelMain, "KyraEngine_v2::gui_handleMainMenu()");
int command = -1;
-
+
uint8 colorMap[16];
memset(colorMap, 0, sizeof(colorMap));
_screen->setTextColorMap(colorMap);
-
+
const char * const *strings;
-
+
Screen::FontId oldFont = _screen->setFont(Screen::FID_8_FNT);
int charWidthBackUp = _screen->_charWidth;
-
+
_screen->_charWidth = -2;
if (_flags.gameID == GI_KYRA2) {
@@ -91,9 +91,9 @@ int KyraEngine_v2::gui_handleMainMenu() {
gui_drawMainBox(x, y, width, height, 1);
gui_drawMainBox(x + 1, y + 1, width - 2, height - 2, 0);
-
+
int selected = 0;
-
+
gui_drawMainMenu(strings, selected);
_screen->showMouse();
@@ -102,7 +102,7 @@ int KyraEngine_v2::gui_handleMainMenu() {
int textPos = ((_screen->_curDim->w >> 1) + _screen->_curDim->sx) << 3;
Common::Rect menuRect(x + 16, y + 4, x + width - 16, y + 4 + fh * 4);
-
+
while (!_quitFlag) {
gui_updateMainMenuAnimation();
bool mousePressed = gui_mainMenuGetInput();
@@ -133,14 +133,14 @@ int KyraEngine_v2::gui_handleMainMenu() {
}
_system->delayMillis(10);
}
-
+
if (_quitFlag)
command = -1;
-
+
_screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 3, 0);
_screen->_charWidth = charWidthBackUp;
_screen->setFont(oldFont);
-
+
return command;
}
@@ -157,7 +157,7 @@ void KyraEngine_v2::gui_drawMainMenu(const char *const *strings, int select) {
int top = _screen->_curDim->sy;
top += menuTable[1];
-
+
for (int i = 0; i < menuTable[3]; ++i) {
int curY = top + i * _screen->getFontHeight();
int color = (i == select) ? menuTable[6] : menuTable[5];
@@ -175,17 +175,17 @@ void KyraEngine_v2::gui_drawMainBox(int x, int y, int w, int h, int fill) {
colorTable = kyra3ColorTable;
else
colorTable = kyra2ColorTable;
-
+
--w; --h;
if (fill)
_screen->fillRect(x, y, x+w, y+h, colorTable[0]);
-
+
_screen->drawClippedLine(x, y+h, x+w, y+h, colorTable[1]);
_screen->drawClippedLine(x+w, y, x+w, y+h, colorTable[1]);
_screen->drawClippedLine(x, y, x+w, y, colorTable[2]);
_screen->drawClippedLine(x, y, x, y+h, colorTable[2]);
-
+
_screen->setPagePixel(_screen->_curPage, x, y+h, colorTable[3]);
_screen->setPagePixel(_screen->_curPage, x+w, y, colorTable[3]);
}
@@ -194,29 +194,29 @@ void KyraEngine_v2::gui_printString(const char *format, int x, int y, int col1,
debugC(9, kDebugLevelMain, "KyraEngine_v2::gui_printString('%s', %d, %d, %d, %d, %d, ...)", format, x, y, col1, col2, flags);
if (!format)
return;
-
+
char string[512];
va_list vaList;
va_start(vaList, flags);
vsprintf(string, format, vaList);
va_end(vaList);
-
+
if (flags & 1)
x -= _screen->getTextWidth(string) >> 1;
-
+
if (flags & 2)
x -= _screen->getTextWidth(string);
-
+
if (flags & 4) {
_screen->printText(string, x - 1, y, 240, col2);
_screen->printText(string, x, y + 1, 240, col2);
}
-
+
if (flags & 8) {
_screen->printText(string, x - 1, y, 227, col2);
_screen->printText(string, x, y + 1, 227, col2);
}
-
+
_screen->printText(string, x, y, col1, col2);
}
diff --git a/engines/kyra/items_v1.cpp b/engines/kyra/items_v1.cpp
index 026736077b..ae3ba2821a 100644
--- a/engines/kyra/items_v1.cpp
+++ b/engines/kyra/items_v1.cpp
@@ -90,10 +90,10 @@ byte KyraEngine_v1::findItemAtPos(int x, int y) {
const uint8 *itemsTable = _roomTable[_currentCharacter->sceneId].itemsTable;
const uint16 *xposOffset = _roomTable[_currentCharacter->sceneId].itemsXPos;
const uint8 *yposOffset = _roomTable[_currentCharacter->sceneId].itemsYPos;
-
+
int highestYPos = -1;
byte returnValue = 0xFF;
-
+
for (int i = 0; i < 12; ++i) {
if (*itemsTable != 0xFF) {
int xpos = *xposOffset - 11;
@@ -103,7 +103,7 @@ byte KyraEngine_v1::findItemAtPos(int x, int y) {
int itemHeight = _itemTable[*itemsTable].height;
int ypos = *yposOffset + 3;
int ypos2 = ypos - itemHeight - 3;
-
+
if (y > ypos2 && ypos > y) {
if (highestYPos <= ypos) {
returnValue = i;
@@ -116,7 +116,7 @@ byte KyraEngine_v1::findItemAtPos(int x, int y) {
++yposOffset;
++itemsTable;
}
-
+
return returnValue;
}
@@ -128,16 +128,16 @@ void KyraEngine_v1::placeItemInGenericMapScene(int item, int index) {
static const uint16 itemMapSceneMaxTable[] = {
0x0010, 0x0024, 0x00C6, 0x006C, 0x00F5, 0x0000
};
-
+
int minValue = itemMapSceneMinTable[index];
int maxValue = itemMapSceneMaxTable[index];
-
+
while (true) {
int room = _rnd.getRandomNumberRng(minValue, maxValue);
assert(room < _roomTableSize);
int nameIndex = _roomTable[room].nameIndex;
bool placeItem = false;
-
+
switch (nameIndex) {
case 0: case 1: case 2: case 3:
case 4: case 5: case 6: case 11:
@@ -149,7 +149,7 @@ void KyraEngine_v1::placeItemInGenericMapScene(int item, int index) {
case 85: case 104: case 105: case 106:
placeItem = true;
break;
-
+
case 51:
if (room != 46)
placeItem = true;
@@ -158,7 +158,7 @@ void KyraEngine_v1::placeItemInGenericMapScene(int item, int index) {
default:
break;
}
-
+
if (placeItem) {
Room *roomPtr = &_roomTable[room];
if (roomPtr->northExit == 0xFFFF && roomPtr->eastExit == 0xFFFF && roomPtr->southExit == 0xFFFF && roomPtr->westExit == 0xFFFF)
@@ -166,7 +166,7 @@ void KyraEngine_v1::placeItemInGenericMapScene(int item, int index) {
else if (_currentCharacter->sceneId == room)
placeItem = false;
}
-
+
if (placeItem) {
if (!processItemDrop(room, item, -1, -1, 2, 0))
continue;
@@ -209,7 +209,7 @@ void KyraEngine_v1::wipeDownMouseItem(int xpos, int ypos) {
backUpItemRect1(xpos, ypos);
int y = ypos;
int height = 16;
-
+
while (height >= 0) {
restoreItemRect1(xpos, ypos);
_screen->setNewShapeHeight(_shapes[216+_itemInHand], height);
@@ -219,7 +219,7 @@ void KyraEngine_v1::wipeDownMouseItem(int xpos, int ypos) {
y += 2;
height -= 2;
delayUntil(nextTime);
- }
+ }
restoreItemRect1(xpos, ypos);
_screen->resetShapeHeight(_shapes[216+_itemInHand]);
destroyMouseItem();
@@ -235,10 +235,10 @@ void KyraEngine_v1::setupSceneItems() {
uint8 item = currentRoom->itemsTable[i];
if (item == 0xFF || !currentRoom->needInit[i])
continue;
-
+
int xpos = 0;
int ypos = 0;
-
+
if (currentRoom->itemsXPos[i] == 0xFFFF) {
xpos = currentRoom->itemsXPos[i] = _rnd.getRandomNumberRng(24, 296);
ypos = currentRoom->itemsYPos[i] = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 130);
@@ -246,9 +246,9 @@ void KyraEngine_v1::setupSceneItems() {
xpos = currentRoom->itemsXPos[i];
ypos = currentRoom->itemsYPos[i];
}
-
+
_lastProcessedItem = i;
-
+
int stop = 0;
while (!stop) {
stop = processItemDrop(sceneId, item, xpos, ypos, 3, 0);
@@ -268,14 +268,14 @@ int KyraEngine_v1::countItemsInScene(uint16 sceneId) {
debugC(9, kDebugLevelMain, "KyraEngine_v1::countItemsInScene(%d)", sceneId);
assert(sceneId < _roomTableSize);
Room *currentRoom = &_roomTable[sceneId];
-
+
int items = 0;
-
+
for (int i = 0; i < 12; ++i) {
if (currentRoom->itemsTable[i] != 0xFF)
++items;
}
-
+
return items;
}
@@ -285,15 +285,15 @@ int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int
uint8 itemIndex = findItemAtPos(x, y);
if (unk1)
itemIndex = 0xFF;
-
+
if (itemIndex != 0xFF) {
exchangeItemWithMouseItem(sceneId, itemIndex);
return 0;
}
-
+
assert(sceneId < _roomTableSize);
Room *currentRoom = &_roomTable[sceneId];
-
+
if (unk1 != 3) {
for (int i = 0; i < 12; ++i) {
if (currentRoom->itemsTable[i] == 0xFF) {
@@ -307,20 +307,20 @@ int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int
if (freeItem == -1)
return 0;
-
+
if (sceneId != _currentCharacter->sceneId) {
addItemToRoom(sceneId, item, freeItem, x, y);
return 1;
}
-
+
int itemHeight = _itemTable[item].height;
_lastProcessedItemHeight = itemHeight;
-
+
if (x == -1 && x == -1) {
x = _rnd.getRandomNumberRng(16, 304);
y = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 135);
}
-
+
int xpos = x;
int ypos = y;
int destY = -1;
@@ -330,25 +330,25 @@ int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int
while (running) {
if ((_northExitHeight & 0xFF) <= ypos) {
bool running2 = true;
-
+
if (_screen->getDrawLayer(xpos, ypos) > 1) {
if (((_northExitHeight >> 8) & 0xFF) != ypos)
running2 = false;
}
-
+
if (_screen->getDrawLayer2(xpos, ypos, itemHeight) > 1) {
if (((_northExitHeight >> 8) & 0xFF) != ypos)
running2 = false;
}
-
+
if (!isDropable(xpos, ypos)) {
if (((_northExitHeight >> 8) & 0xFF) != ypos)
running2 = false;
}
-
+
int xpos2 = xpos;
int xpos3 = xpos;
-
+
while (running2) {
if (isDropable(xpos2, ypos)) {
if (_screen->getDrawLayer2(xpos2, ypos, itemHeight) < 7) {
@@ -360,7 +360,7 @@ int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int
}
}
}
-
+
if (isDropable(xpos3, ypos)) {
if (_screen->getDrawLayer2(xpos3, ypos, itemHeight) < 7) {
if (findItemAtPos(xpos3, ypos) == 0xFF) {
@@ -371,18 +371,18 @@ int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int
}
}
}
-
+
if (!running2)
continue;
-
+
xpos2 -= 2;
if (xpos2 < 16)
xpos2 = 16;
-
+
xpos3 += 2;
if (xpos3 > 304)
xpos3 = 304;
-
+
if (xpos2 > 16)
continue;
if (xpos3 < 304)
@@ -390,45 +390,45 @@ int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int
running2 = false;
}
}
-
+
if (((_northExitHeight >> 8) & 0xFF) == ypos) {
running = 0;
destY -= _rnd.getRandomNumberRng(0, 3);
-
+
if ((_northExitHeight & 0xFF) < destY)
continue;
-
+
destY = (_northExitHeight & 0xFF) + 1;
continue;
- }
+ }
ypos += 2;
if (((_northExitHeight >> 8) & 0xFF) >= ypos)
continue;
ypos = (_northExitHeight >> 8) & 0xFF;
}
-
+
if (destX == -1 || destY == -1)
return 0;
-
+
if (unk1 == 3) {
currentRoom->itemsXPos[freeItem] = destX;
currentRoom->itemsYPos[freeItem] = destY;
return 1;
}
-
+
if (unk1 == 2)
itemSpecialFX(x, y, item);
-
+
if (unk1 == 0)
destroyMouseItem();
-
+
itemDropDown(x, y, destX, destY, freeItem, item);
-
+
if (unk1 == 0 && unk2 != 0) {
assert(_itemList && _droppedList);
updateSentenceCommand(_itemList[item], _droppedList[0], 179);
}
-
+
return 1;
}
@@ -438,13 +438,13 @@ void KyraEngine_v1::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) {
_animator->animRemoveGameItem(itemIndex);
assert(sceneId < _roomTableSize);
Room *currentRoom = &_roomTable[sceneId];
-
+
int item = currentRoom->itemsTable[itemIndex];
currentRoom->itemsTable[itemIndex] = _itemInHand;
_itemInHand = item;
_animator->animAddGameItem(itemIndex, sceneId);
snd_playSoundEffect(53);
-
+
setMouseItem(_itemInHand);
assert(_itemList && _takenList);
updateSentenceCommand(_itemList[_itemInHand], _takenList[1], 179);
@@ -468,16 +468,16 @@ int KyraEngine_v1::checkNoDropRects(int x, int y) {
_lastProcessedItemHeight = 16;
if (_noDropRects[0].x == -1)
return 0;
-
+
for (int i = 0; i < 11; ++i) {
if (_noDropRects[i].x == -1)
break;
-
+
int xpos = _noDropRects[i].x;
int ypos = _noDropRects[i].y;
int xpos2 = _noDropRects[i].x2;
int ypos2 = _noDropRects[i].y2;
-
+
if (xpos > x + 16)
continue;
if (xpos2 < x)
@@ -488,7 +488,7 @@ int KyraEngine_v1::checkNoDropRects(int x, int y) {
continue;
return 1;
}
-
+
return 0;
}
@@ -496,14 +496,14 @@ int KyraEngine_v1::isDropable(int x, int y) {
debugC(9, kDebugLevelMain, "KyraEngine_v1::isDropable(%d, %d)", x, y);
x -= 8;
y -= 1;
-
+
if (checkNoDropRects(x, y))
return 0;
-
+
for (int xpos = x; xpos < x + 16; ++xpos) {
if (_screen->getShapeFlag1(xpos, y) == 0)
return 0;
- }
+ }
return 1;
}
@@ -525,9 +525,9 @@ void KyraEngine_v1::itemDropDown(int x, int y, int destX, int destY, byte freeIt
int addY = 2;
int drawX = x - 8;
int drawY = 0;
-
+
backUpItemRect0(drawX, y - 16);
-
+
while (tempY < destY) {
restoreItemRect0(drawX, tempY - 16);
tempY += addY;
@@ -541,18 +541,18 @@ void KyraEngine_v1::itemDropDown(int x, int y, int destX, int destY, byte freeIt
_screen->updateScreen();
delayUntil(nextTime);
}
-
+
bool skip = false;
if (x == destX) {
if (destY - y <= 16)
skip = true;
}
-
+
if (!skip) {
snd_playSoundEffect(0x47);
if (addY < 6)
addY = 6;
-
+
int xDiff = (destX - x) << 4;
xDiff /= addY;
int startAddY = addY;
@@ -640,7 +640,7 @@ void KyraEngine_v1::itemSpecialFX2(int x, int y, int item) {
backUpItemRect0(x, y);
if (item >= 80 && item <= 89)
snd_playSoundEffect(55);
-
+
for (int i = 201; i <= 205; ++i) {
restoreItemRect0(x, y);
uint32 nextTime = _system->getMillis() + 3 * _tickLength;
@@ -648,7 +648,7 @@ void KyraEngine_v1::itemSpecialFX2(int x, int y, int item) {
_screen->updateScreen();
delayUntil(nextTime);
}
-
+
for (int i = 204; i >= 201; --i) {
restoreItemRect0(x, y);
uint32 nextTime = _system->getMillis() + 3 * _tickLength;
@@ -673,10 +673,10 @@ void KyraEngine_v1::magicOutMouseItem(int animIndex, int itemPos) {
x = _itemPosX[itemPos] - 4;
y = _itemPosY[itemPos] - 3;
}
-
+
if (_itemInHand == -1 && itemPos == -1)
return;
-
+
int tableIndex = 0, loopStart = 0, maxLoops = 0;
if (animIndex == 0) {
tableIndex = _rnd.getRandomNumberRng(0, 5);
@@ -693,7 +693,7 @@ void KyraEngine_v1::magicOutMouseItem(int animIndex, int itemPos) {
} else {
tableIndex = -1;
}
-
+
if (animIndex == 2)
snd_playSoundEffect(0x5E);
else
@@ -712,13 +712,13 @@ void KyraEngine_v1::magicOutMouseItem(int animIndex, int itemPos) {
_screen->updateScreen();
delayUntil(nextTime);
}
-
+
if (itemPos != -1) {
restoreItemRect1(x, y);
_screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0);
backUpItemRect1(x, y);
}
-
+
for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) {
restoreItemRect1(x, y);
uint32 nextTime = _system->getMillis() + 4 * _tickLength;
@@ -774,14 +774,14 @@ void KyraEngine_v1::magicInMouseItem(int animIndex, int item, int itemPos) {
loopStart = 124;
maxLoops = 4;
}
-
+
_screen->hideMouse();
backUpItemRect1(x, y);
if (animIndex == 2)
snd_playSoundEffect(0x5E);
else
snd_playSoundEffect(0x37);
-
+
for (int shape = _magicMouseItemStartFrame[animIndex]; shape <= _magicMouseItemEndFrame[animIndex]; ++shape) {
restoreItemRect1(x, y);
uint32 nextTime = _system->getMillis() + 4 * _tickLength;
@@ -792,7 +792,7 @@ void KyraEngine_v1::magicInMouseItem(int animIndex, int item, int itemPos) {
_screen->updateScreen();
delayUntil(nextTime);
}
-
+
for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) {
restoreItemRect1(x, y);
uint32 nextTime = _system->getMillis() + 4 * _tickLength;
@@ -869,7 +869,7 @@ void KyraEngine_v1::updatePlayerItemsForScene() {
_screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]);
_screen->showMouse();
}
-
+
bool redraw = false;
for (int i = 0; i < 10; ++i) {
uint8 item = _currentCharacter->inventoryItems[i];
@@ -881,16 +881,16 @@ void KyraEngine_v1::updatePlayerItemsForScene() {
redraw = true;
}
}
-
+
if (redraw) {
_screen->hideMouse();
redrawInventory(0);
_screen->showMouse();
}
-
+
if (_itemInHand == 33)
magicOutMouseItem(2, -1);
-
+
_screen->hideMouse();
for (int i = 0; i < 10; ++i) {
uint8 item = _currentCharacter->inventoryItems[i];
diff --git a/engines/kyra/items_v2.cpp b/engines/kyra/items_v2.cpp
index bc90b32544..02aeb7912c 100644
--- a/engines/kyra/items_v2.cpp
+++ b/engines/kyra/items_v2.cpp
@@ -78,7 +78,7 @@ int KyraEngine_v2::checkItemCollision(int x, int y) {
yPos = curItem.y;
}
}
-
+
return itemPos;
}
@@ -139,7 +139,7 @@ bool KyraEngine_v2::processItemDrop(uint16 sceneId, uint16 item, int x, int y, i
}
int itemHeight = _itemHtDat[item];
-
+
// no idea why it's '&&' here and not single checks for x and y
if (x == -1 && y == -1) {
x = _rnd.getRandomNumberRng(0x10, 0x130);
@@ -188,7 +188,7 @@ bool KyraEngine_v2::processItemDrop(uint16 sceneId, uint16 item, int x, int y, i
if (itemX == -1 || itemY == -1)
return false;
-
+
if (unk1 == 3) {
_itemList[freeItemSlot].x = itemX;
_itemList[freeItemSlot].y = itemY;
@@ -286,7 +286,7 @@ void KyraEngine_v2::itemDropDown(int startX, int startY, int dstX, int dstY, int
uint16 endDelay = _system->getMillis() + _tickLength;
_screen->drawShape(0, itemShape, x, y, 0, 0);
_screen->updateScreen();
-
+
// XXX: original doesn't update game state while delaying
// our implementation *could* do it, so maybe check this again
delayUntil(endDelay);
@@ -295,7 +295,7 @@ void KyraEngine_v2::itemDropDown(int startX, int startY, int dstX, int dstY, int
restoreGfxRect24x24(x, y);
} else {
restoreGfxRect24x24(curX, curY-16);
- }
+ }
}
if (_layerFlagTable[_screen->getLayer(dstX, dstY)] && item != 13) {
@@ -329,10 +329,10 @@ void KyraEngine_v2::exchangeMouseItem(int itemPos) {
snd_playSoundEffect(0x0b);
setMouseCursor(_itemInHand);
int str2 = 7;
-
+
if (_lang == 1)
str2 = getItemCommandStringPickUp(itemId);
-
+
updateCommandLineEx(itemId + 54, str2, 0xD6);
_screen->showMouse();
@@ -341,7 +341,7 @@ void KyraEngine_v2::exchangeMouseItem(int itemPos) {
bool KyraEngine_v2::pickUpItem(int x, int y) {
int itemPos = checkItemCollision(x, y);
-
+
if (itemPos <= -1)
return false;
@@ -355,10 +355,10 @@ bool KyraEngine_v2::pickUpItem(int x, int y) {
snd_playSoundEffect(0x0b);
setMouseCursor(itemId);
int str2 = 7;
-
+
if (_lang == 1)
str2 = getItemCommandStringPickUp(itemId);
-
+
updateCommandLineEx(itemId + 54, str2, 0xD6);
_itemInHand = itemId;
_screen->showMouse();
@@ -375,7 +375,7 @@ bool KyraEngine_v2::isDropable(int x, int y) {
x -= 8;
y -= 1;
-
+
for (int xpos = x; xpos < x + 16; ++xpos) {
if (_screen->getShapeFlag1(xpos, y) == 0)
return false;
diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp
index b0bc58ef49..b71e696df1 100644
--- a/engines/kyra/kyra.cpp
+++ b/engines/kyra/kyra.cpp
@@ -241,7 +241,7 @@ void KyraEngine::registerDefaultSettings() {
void KyraEngine::readSettings() {
_configWalkspeed = ConfMan.getInt("walkspeed");
- _configMusic = ConfMan.getBool("music_mute") ? 0 : ((ConfMan.getBool("cdaudio") && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) ? 2 : 1);
+ _configMusic = ConfMan.getBool("music_mute") ? 0 : ((ConfMan.getBool("cdaudio") && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) ? 2 : 1);
_configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1;
_sound->enableMusic(_configMusic);
diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h
index ea322f4d77..4614b6537d 100644
--- a/engines/kyra/kyra.h
+++ b/engines/kyra/kyra.h
@@ -58,7 +58,7 @@ enum {
struct AudioDataStruct {
const char * const *_fileList;
- const int _fileListLen;
+ const int _fileListLen;
const void * const _cdaTracks;
const int _cdaNumTracks;
};
@@ -92,12 +92,12 @@ class KyraEngine : public Engine {
public:
KyraEngine(OSystem *system, const GameFlags &flags);
virtual ~KyraEngine();
-
+
bool quit() const { return _quitFlag; }
-
+
uint8 game() const { return _flags.gameID; }
const GameFlags &gameFlags() const { return _flags; }
-
+
// access to Kyra specific functionallity
Resource *resource() { return _res; }
virtual Screen *screen() = 0;
@@ -105,17 +105,17 @@ public:
Sound *sound() { return _sound; }
StaticResource *staticres() { return _staticres; }
TimerManager *timer() { return _timer; }
-
+
uint32 tickLength() const { return _tickLength; }
-
+
virtual Movie *createWSAMovie() = 0;
-
+
Common::RandomSource _rnd;
-
+
// quit handling
virtual void quitGame();
- // game flag handling
+ // game flag handling
int setGameFlag(int flag);
int queryGameFlag(int flag) const;
int resetGameFlag(int flag);
@@ -127,7 +127,7 @@ public:
virtual void snd_playVoiceFile(int id) = 0;
virtual bool snd_voiceIsPlaying();
virtual void snd_stopVoice();
-
+
// delay functionallity
virtual void delayUntil(uint32 timestamp, bool updateGameTimers = false, bool update = false, bool isMainLoop = false);
virtual void delay(uint32 millis, bool update = false, bool isMainLoop = false);
@@ -136,10 +136,10 @@ public:
protected:
virtual int go() = 0;
virtual int init();
-
+
// quit Handling
bool _quitFlag;
-
+
// intern
Resource *_res;
Sound *_sound;
@@ -161,7 +161,7 @@ protected:
bool speechEnabled();
bool textEnabled();
-
+
// game speed
bool _skipFlag;
uint16 _tickLength;
@@ -171,7 +171,7 @@ protected:
virtual void setupTimers() = 0;
virtual void setWalkspeed(uint8 speed) = 0;
-
+
// detection
GameFlags _flags;
int _lang;
@@ -179,7 +179,7 @@ protected:
// opcode
virtual void setupOpcodeTable() = 0;
Common::Array<const Opcode*> _opcodes;
-
+
// game flags
uint8 _flagsTable[100]; // TODO: check this value
@@ -190,10 +190,10 @@ protected:
const int8 *_trackMap;
int _trackMapSize;
-
- // input
+
+ // input
Common::Point getMousePos() const;
-
+
// pathfinder
virtual int findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize);
int findSubPath(int x, int y, int toX, int toY, int *moveTable, int start, int end);
@@ -202,7 +202,7 @@ protected:
void changePosTowardsFacing(int &x, int &y, int facing);
int getMoveTableSize(int *moveTable);
virtual bool lineIsPassable(int x, int y) = 0;
-
+
static const int8 _addXPosTable[];
static const int8 _addYPosTable[];
};
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index 8630fc9806..87c6d4f843 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -53,10 +53,10 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
_seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm =
_seq_MalcolmTree = _seq_WestwoodLogo = _seq_Demo1 = _seq_Demo2 = _seq_Demo3 =
_seq_Demo4 = 0;
-
+
_seq_WSATable = _seq_CPSTable = _seq_COLTable = _seq_textsTable = 0;
_seq_WSATable_Size = _seq_CPSTable_Size = _seq_COLTable_Size = _seq_textsTable_Size = 0;
-
+
_roomFilenameTable = _characterImageTable = 0;
_roomFilenameTableSize = _characterImageTableSize = 0;
_itemList = _takenList = _placedList = _droppedList = _noDropList = 0;
@@ -66,7 +66,7 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags)
_thePoison = _fluteString = _wispJewelStrings = _magicJewelString = _flaskFull = _fullFlask = 0;
_thePoison_Size = _fluteString_Size = _wispJewelStrings_Size = 0;
_magicJewelString_Size = _flaskFull_Size = _fullFlask_Size = 0;
-
+
_defaultShapeTable = 0;
_healingShapeTable = _healingShape2Table = 0;
_defaultShapeTableSize = _healingShapeTableSize = _healingShape2TableSize = 0;
@@ -122,15 +122,15 @@ KyraEngine_v1::~KyraEngine_v1() {
delete _sprites;
delete _animator;
delete _seq;
-
+
delete _npcScriptData;
delete _scriptMain;
-
+
delete _scriptClickData;
delete _scriptClick;
-
+
delete [] _characterList;
-
+
delete [] _movFacingTable;
delete [] _scrollUpButton.process0PtrShape;
@@ -141,7 +141,7 @@ KyraEngine_v1::~KyraEngine_v1() {
delete [] _scrollDownButton.process2PtrShape;
delete [] _itemBkgBackUp[0];
- delete [] _itemBkgBackUp[1];
+ delete [] _itemBkgBackUp[1];
for (int i = 0; i < ARRAYSIZE(_shapes); ++i) {
if (_shapes[i] != 0) {
@@ -179,12 +179,12 @@ int KyraEngine_v1::init() {
assert(_text);
initStaticResource();
-
+
_sound->setSoundList(&_soundData[kMusicIntro]);
_trackMap = _dosTrackMap;
_trackMapSize = _dosTrackMapSize;
-
+
if (!_sound->init())
error("Couldn't init sound");
@@ -207,27 +207,27 @@ int KyraEngine_v1::init() {
_characterList[0].height = 48;
_characterList[0].facing = 3;
_characterList[0].currentAnimFrame = 7;
-
+
_npcScriptData = new ScriptData;
memset(_npcScriptData, 0, sizeof(ScriptData));
assert(_npcScriptData);
_npcScript = new ScriptState;
assert(_npcScript);
memset(_npcScript, 0, sizeof(ScriptState));
-
+
_scriptMain = new ScriptState;
assert(_scriptMain);
memset(_scriptMain, 0, sizeof(ScriptState));
-
+
_scriptClickData = new ScriptData;
assert(_scriptClickData);
memset(_scriptClickData, 0, sizeof(ScriptData));
_scriptClick = new ScriptState;
assert(_scriptClick);
memset(_scriptClick, 0, sizeof(ScriptState));
-
+
_debugger = new Debugger_v1(this);
- assert(_debugger);
+ assert(_debugger);
memset(_shapes, 0, sizeof(_shapes));
for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i)
@@ -251,7 +251,7 @@ int KyraEngine_v1::init() {
_brandonPosX = _brandonPosY = -1;
_deathHandler = 0xFF;
_poisonDeathCounter = 0;
-
+
memset(_itemTable, 0, sizeof(_itemTable));
memset(_exitList, 0xFFFF, sizeof(_exitList));
_exitListPtr = 0;
@@ -269,17 +269,17 @@ int KyraEngine_v1::init() {
memset(_foyerItemTable, -1, sizeof(_foyerItemTable));
_mouseState = _itemInHand = -1;
_handleInput = false;
-
+
_currentRoom = 0xFFFF;
_scenePhasingFlag = 0;
_lastProcessedItem = 0;
_lastProcessedItemHeight = 16;
-
+
_unkScreenVar1 = 1;
_unkScreenVar2 = 0;
_unkScreenVar3 = 0;
_unkAmuletVar = 0;
-
+
_endSequenceNeedLoading = 1;
_malcolmFlag = 0;
_beadStateVar = 0;
@@ -291,16 +291,16 @@ int KyraEngine_v1::init() {
_lastDisplayedPanPage = 0;
memset(_panPagesTable, 0, sizeof(_panPagesTable));
_finalA = _finalB = _finalC = 0;
- memset(&_kyragemFadingState, 0, sizeof(_kyragemFadingState));
+ memset(&_kyragemFadingState, 0, sizeof(_kyragemFadingState));
_kyragemFadingState.gOffset = 0x13;
_kyragemFadingState.bOffset = 0x13;
_mousePressFlag = false;
-
+
_menuDirectlyToLoad = false;
_lastMusicCommand = 0;
-
+
return 0;
}
@@ -390,15 +390,15 @@ void KyraEngine_v1::startup() {
while (_scriptInterpreter->validScript(_scriptMain))
_scriptInterpreter->runScript(_scriptMain);
-
+
_scriptInterpreter->unloadScript(_npcScriptData);
if (!_scriptInterpreter->loadScript("_NPC.EMC", _npcScriptData, &_opcodes))
error("Could not load \"_NPC.EMC\" script");
-
+
snd_playTheme(1);
enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1);
-
+
if (_abortIntroFlag && _skipIntroFlag) {
_menuDirectlyToLoad = true;
_screen->setMouseCursor(1, 1, _shapes[0]);
@@ -421,7 +421,7 @@ void KyraEngine_v1::mainLoop() {
if (seq_playEnd() && _deathHandler != 8)
break;
}
-
+
if (_deathHandler != 0xFF) {
snd_playWanderScoreViaMap(0, 1);
snd_playSoundEffect(49);
@@ -432,7 +432,7 @@ void KyraEngine_v1::mainLoop() {
buttonMenuCallback(0);
_deathHandler = 0xFF;
}
-
+
if ((_brandonStatusBit & 2) && _brandonStatusBit0x02Flag)
_animator->animRefreshNPC(0);
@@ -440,7 +440,7 @@ void KyraEngine_v1::mainLoop() {
_animator->animRefreshNPC(0);
_brandonStatusBit0x20Flag = 0;
}
-
+
_screen->showMouse();
processButtonList(_buttonList);
@@ -474,7 +474,7 @@ void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
case Common::EVENT_KEYDOWN:
- if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' &&
+ if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' &&
(event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && isMainLoop) {
const char *saveLoadSlot = getSavegameFilename(event.kbd.keycode - '0');
@@ -510,7 +510,7 @@ void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) {
case Common::EVENT_LBUTTONUP:
_mousePressFlag = false;
- if (_abortWalkFlag2)
+ if (_abortWalkFlag2)
_abortWalkFlag = true;
if (_handleInput) {
@@ -541,7 +541,7 @@ void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) {
if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE))
_skipFlag = false;
-
+
if (amount > 0 && !_skipFlag && !_quitFlag)
_system->delayMillis(10);
@@ -698,8 +698,8 @@ void KyraEngine_v1::processInput() {
int handled = clickEventHandler(xpos, ypos);
if (_changedScene || handled)
return;
- }
-
+ }
+
// XXX _deathHandler specific
if (ypos <= 158) {
uint16 exit = 0xFFFF;
@@ -712,7 +712,7 @@ void KyraEngine_v1::processInput() {
} else if (ypos < 12) {
exit = _walkBlockNorth;
}
-
+
if (exit != 0xFFFF) {
_abortWalkFlag2 = true;
handleSceneChange(xpos, ypos, 1, 1);
@@ -742,7 +742,7 @@ void KyraEngine_v1::processInput() {
}
}
}
- }
+ }
}
int KyraEngine_v1::processInputHelper(int xpos, int ypos) {
@@ -789,7 +789,7 @@ int KyraEngine_v1::clickEventHandler(int xpos, int ypos) {
void KyraEngine_v1::updateMousePointer(bool forceUpdate) {
int shape = 0;
-
+
int newMouseState = 0;
int newX = 0;
int newY = 0;
@@ -834,7 +834,7 @@ void KyraEngine_v1::updateMousePointer(bool forceUpdate) {
}
}
}
-
+
if (mouse.x >= _entranceMouseCursorTracks[0] && mouse.y >= _entranceMouseCursorTracks[1]
&& mouse.x <= _entranceMouseCursorTracks[2] && mouse.y <= _entranceMouseCursorTracks[3]) {
switch (_entranceMouseCursorTracks[4]) {
@@ -870,20 +870,20 @@ void KyraEngine_v1::updateMousePointer(bool forceUpdate) {
break;
}
}
-
+
if (newMouseState == -2) {
shape = 6;
newX = 4;
newY = 4;
}
-
+
if ((newMouseState && _mouseState != newMouseState) || (newMouseState && forceUpdate)) {
_mouseState = newMouseState;
_screen->hideMouse();
_screen->setMouseCursor(newX, newY, _shapes[shape]);
_screen->showMouse();
}
-
+
if (!newMouseState) {
if (_mouseState != _itemInHand || forceUpdate) {
if (mouse.y > 158 || (mouse.x >= 12 && mouse.x < 308 && mouse.y < 136 && mouse.y >= 12) || forceUpdate) {
@@ -924,7 +924,7 @@ void KyraEngine_v1::clickEventHandler2() {
_scriptClick->regs[2] = mouse.y;
_scriptClick->regs[4] = _itemInHand;
_scriptInterpreter->startScript(_scriptClick, 6);
-
+
while (_scriptInterpreter->validScript(_scriptClick))
_scriptInterpreter->runScript(_scriptClick);
}
@@ -934,28 +934,28 @@ int KyraEngine_v1::checkForNPCScriptRun(int xpos, int ypos) {
int returnValue = -1;
const Character *currentChar = _currentCharacter;
int charLeft = 0, charRight = 0, charTop = 0, charBottom = 0;
-
+
int scaleFactor = _scaleTable[currentChar->y1];
int addX = (((scaleFactor*8)*3)>>8)>>1;
int addY = ((scaleFactor*3)<<4)>>8;
-
+
charLeft = currentChar->x1 - addX;
charRight = currentChar->x1 + addX;
charTop = currentChar->y1 - addY;
charBottom = currentChar->y1;
-
+
if (xpos >= charLeft && charRight >= xpos && charTop <= ypos && charBottom >= ypos)
return 0;
-
+
if (xpos > 304 || xpos < 16)
return -1;
-
+
for (int i = 1; i < 5; ++i) {
currentChar = &_characterList[i];
-
+
if (currentChar->sceneId != _currentCharacter->sceneId)
continue;
-
+
charLeft = currentChar->x1 - 12;
charRight = currentChar->x1 + 11;
charTop = currentChar->y1 - 48;
@@ -963,10 +963,10 @@ int KyraEngine_v1::checkForNPCScriptRun(int xpos, int ypos) {
// charBottom = currentChar->y2 - 16;
// else
charBottom = currentChar->y1;
-
+
if (xpos < charLeft || xpos > charRight || ypos < charTop || charBottom < ypos)
continue;
-
+
if (returnValue != -1) {
if (currentChar->y1 >= _characterList[returnValue].y1)
returnValue = i;
@@ -974,7 +974,7 @@ int KyraEngine_v1::checkForNPCScriptRun(int xpos, int ypos) {
returnValue = i;
}
}
-
+
return returnValue;
}
@@ -985,7 +985,7 @@ void KyraEngine_v1::runNpcScript(int func) {
_npcScript->regs[0] = _currentCharacter->sceneId;
_npcScript->regs[4] = _itemInHand;
_npcScript->regs[5] = func;
-
+
while (_scriptInterpreter->validScript(_npcScript))
_scriptInterpreter->runScript(_npcScript);
}
@@ -1050,7 +1050,7 @@ void KyraEngine_v1::writeSettings() {
}
ConfMan.setInt("talkspeed", talkspeed);
-
+
KyraEngine::writeSettings();
}
@@ -1258,7 +1258,7 @@ void KyraEngine_v1::setupOpcodeTable() {
// 0x9c
Opcode(o1_dummy)
};
-
+
for (int i = 0; i < ARRAYSIZE(opcodeTable); ++i)
_opcodes.push_back(&opcodeTable[i]);
}
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index e9bba94b96..ac3f9960fe 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -209,7 +209,7 @@ public:
const char * const*seqCPSTable() { return _seq_CPSTable; }
const char * const*seqCOLTable() { return _seq_COLTable; }
const char * const*seqTextsTable() { return _seq_textsTable; }
-
+
const uint8 * const*palTable1() { return &_specialPalettes[0]; }
const uint8 * const*palTable2() { return &_specialPalettes[29]; }
@@ -279,7 +279,7 @@ public:
void snd_playWanderScoreViaMap(int command, int restart);
virtual void snd_playVoiceFile(int id);
void snd_voiceWaitForFinish(bool ingame = true);
-
+
void saveGame(const char *fileName, const char *saveName);
void loadGame(const char *fileName);
@@ -316,7 +316,7 @@ protected:
int findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize);
bool lineIsPassable(int x, int y);
- // -> item handling
+ // -> item handling
// --> misc
void addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y);
@@ -417,10 +417,10 @@ protected:
// misc (TODO)
void startup();
void mainLoop();
-
+
int checkForNPCScriptRun(int xpos, int ypos);
void runNpcScript(int func);
-
+
void loadMouseShapes();
void loadCharacterShapes();
void loadSpecialEffectShapes();
@@ -431,7 +431,7 @@ protected:
void setupPanPages();
void freePanPages();
void closeFinalWsa();
-
+
//void setTimer19();
void setupTimers();
void timerUpdateHeadAnims(int timerNum);
@@ -457,7 +457,7 @@ protected:
void calcCoords(Menu &menu);
void initMenu(Menu &menu);
void setGUILabels();
-
+
Button *initButton(Button *list, Button *newButton);
void processButtonList(Button *list);
void processButton(Button *button);
@@ -515,7 +515,7 @@ protected:
int _unkScreenVar1, _unkScreenVar2, _unkScreenVar3;
int _beadStateVar;
int _unkAmuletVar;
-
+
int _malcolmFlag;
int _endSequenceSkipFlag;
int _endSequenceNeedLoading;
@@ -526,7 +526,7 @@ protected:
int _lastDisplayedPanPage;
uint8 *_panPagesTable[20];
Movie *_finalA, *_finalB, *_finalC;
-
+
Movie *_movieObjects[10];
uint16 _entranceMouseCursorTracks[8];
@@ -534,18 +534,18 @@ protected:
uint16 _walkBlockEast;
uint16 _walkBlockSouth;
uint16 _walkBlockWest;
-
+
int32 _scaleMode;
int16 _scaleTable[145];
-
+
Rect _noDropRects[11];
-
+
int8 _birthstoneGemTable[4];
int8 _idolGemsTable[3];
-
+
int8 _marbleVaseItem;
int8 _foyerItemTable[3];
-
+
int8 _cauldronState;
int8 _crystalState[2];
@@ -561,27 +561,27 @@ protected:
uint16 _currentChatPartnerBackupFrame;
uint16 _currentCharAnimFrame;
-
+
int8 *_sceneAnimTable[50];
-
+
Item _itemTable[145];
int _lastProcessedItem;
int _lastProcessedItemHeight;
-
+
int16 *_exitListPtr;
int16 _exitList[11];
SceneExits _sceneExits;
uint16 _currentRoom;
int _scenePhasingFlag;
-
+
int _sceneChangeState;
int _loopFlag2;
-
+
int _pathfinderFlag;
int _pathfinderFlag2;
int _lastFindWayRet;
int *_movFacingTable;
-
+
int8 _talkingCharNum;
int8 _charSayUnk2;
int8 _charSayUnk3;
@@ -599,16 +599,16 @@ protected:
Debugger *_debugger;
ScriptState *_scriptMain;
-
+
ScriptState *_npcScript;
ScriptData *_npcScriptData;
-
+
ScriptState *_scriptClick;
ScriptData *_scriptClickData;
-
+
Character *_characterList;
Character *_currentCharacter;
-
+
Button *_buttonList;
Button *_menuButtonList;
bool _displayMenu;
@@ -648,17 +648,17 @@ protected:
const uint8 *_seq_Demo3;
const uint8 *_seq_Demo4;
const uint8 *_seq_Reunion;
-
+
const char * const*_seq_WSATable;
const char * const*_seq_CPSTable;
const char * const*_seq_COLTable;
const char * const*_seq_textsTable;
-
+
int _seq_WSATable_Size;
int _seq_CPSTable_Size;
int _seq_COLTable_Size;
int _seq_textsTable_Size;
-
+
const char * const*_itemList;
const char * const*_takenList;
const char * const*_placedList;
@@ -678,13 +678,13 @@ protected:
const char * const*_veryClever;
const char * const*_homeString;
const char * const*_newGameString;
-
+
const char *_voiceTextString;
const char *_textSpeedString;
const char *_onString;
const char *_offString;
const char *_onCDString;
-
+
int _itemList_Size;
int _takenList_Size;
int _placedList_Size;
@@ -704,7 +704,7 @@ protected:
int _veryClever_Size;
int _homeString_Size;
int _newGameString_Size;
-
+
const char * const*_characterImageTable;
int _characterImageTableSize;
@@ -713,47 +713,47 @@ protected:
const char * const*_configStrings;
int _configStringsSize;
-
+
Shape *_defaultShapeTable;
int _defaultShapeTableSize;
-
+
const Shape *_healingShapeTable;
int _healingShapeTableSize;
const Shape *_healingShape2Table;
int _healingShape2TableSize;
-
+
const Shape *_posionDeathShapeTable;
int _posionDeathShapeTableSize;
-
+
const Shape *_fluteAnimShapeTable;
int _fluteAnimShapeTableSize;
-
+
const Shape *_winterScrollTable;
int _winterScrollTableSize;
const Shape *_winterScroll1Table;
int _winterScroll1TableSize;
const Shape *_winterScroll2Table;
int _winterScroll2TableSize;
-
+
const Shape *_drinkAnimationTable;
int _drinkAnimationTableSize;
-
+
const Shape *_brandonToWispTable;
int _brandonToWispTableSize;
-
+
const Shape *_magicAnimationTable;
int _magicAnimationTableSize;
-
+
const Shape *_brandonStoneTable;
int _brandonStoneTableSize;
-
+
Room *_roomTable;
int _roomTableSize;
const char * const*_roomFilenameTable;
int _roomFilenameTableSize;
-
+
const uint8 *_amuleteAnim;
-
+
const uint8 * const*_specialPalettes;
const char *const *_soundFiles;
@@ -763,14 +763,14 @@ protected:
const int32 *_cdaTrackTable;
int _cdaTrackTableSize;
const AudioDataStruct * _soundData;
-
+
static const int8 _charXPosTable[];
static const int8 _charYPosTable[];
// positions of the inventory
static const uint16 _itemPosX[];
static const uint8 _itemPosY[];
-
+
void setupButtonData();
Button *_buttonData;
Button **_buttonDataListPtr;
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 529b4ffbd5..5f0d1a1e50 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -173,7 +173,7 @@ int KyraEngine_v2::go() {
// load just the pak files needed for ingame
_res->loadPakFile(StaticResource::staticDataFilename());
if (_flags.platform == Common::kPlatformPC && _flags.isTalkie)
- _res->loadFileList("FILEDATA.FDT");
+ _res->loadFileList("FILEDATA.FDT");
else
_res->loadFileList(_ingamePakList, _ingamePakListSize);
}
@@ -214,10 +214,10 @@ void KyraEngine_v2::startup() {
_screenBuffer = new uint8[64000];
_unkBuf200kByte = new uint8[200000];
- loadChapterBuffer(_newChapterFile);
+ loadChapterBuffer(_newChapterFile);
loadCCodeBuffer("C_CODE.XXX");
-
+
if (_flags.isTalkie) {
loadOptionsBuffer("OPTIONS.XXX");
@@ -928,7 +928,7 @@ void KyraEngine_v2::updateCommandLineEx(int str1, int str2, int16 palIndex) {
++src;
*src = toupper(*src);
}
-
+
strcpy((char*)_unkBuf500Bytes, src);
if (str2 > 0) {
@@ -1571,7 +1571,7 @@ void KyraEngine_v2::playVoice(int high, int low) {
void KyraEngine_v2::snd_playSoundEffect(int track) {
debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v2::snd_playSoundEffect(%d)", track);
-
+
if (track == 10)
track = _lastSfxTrack;
@@ -1583,7 +1583,7 @@ void KyraEngine_v2::snd_playSoundEffect(int track) {
int16 vocIndex = (int16) READ_LE_UINT16(&_ingameSoundIndex[track * 2]);
if (vocIndex != -1)
_sound->voicePlay(_ingameSoundList[vocIndex]);
- else if (_flags.platform == Common::kPlatformPC)
+ else if (_flags.platform == Common::kPlatformPC)
// TODO ?? Maybe there is a way to let users select whether they want
// voc, midi or adl sfx (even though it makes no sense to choose anything but voc).
// For now this is used as a fallback only (if no voc file exists).
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 6436cec92f..97ebb263dd 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -859,7 +859,7 @@ protected:
int _sequencePakListSize;
const char *const *_ingamePakList;
int _ingamePakListSize;
-
+
const char *const *_musicFileListIntro;
int _musicFileListIntroSize;
const char *const *_musicFileListFinale;
diff --git a/engines/kyra/kyra_v3.cpp b/engines/kyra/kyra_v3.cpp
index 6ee5eff11c..ce0f1a8cd2 100644
--- a/engines/kyra/kyra_v3.cpp
+++ b/engines/kyra/kyra_v3.cpp
@@ -61,7 +61,7 @@ KyraEngine_v3::KyraEngine_v3(OSystem *system, const GameFlags &flags) : KyraEngi
KyraEngine_v3::~KyraEngine_v3() {
delete _soundDigital;
-
+
delete [] _unkPage1;
delete [] _unkPage2;
delete [] _interfaceCPS1;
@@ -96,12 +96,12 @@ int KyraEngine_v3::init() {
KyraEngine::init();
gui_initMainMenu();
-
+
_soundDigital = new SoundDigital(this, _mixer);
assert(_soundDigital);
if (!_soundDigital->init())
error("_soundDigital->init() failed");
-
+
_screen->loadFont(Screen::FID_6_FNT, "6.FNT");
_screen->loadFont(Screen::FID_8_FNT, "8FAT.FNT");
_screen->loadFont(Screen::FID_BOOKFONT_FNT, "BOOKFONT.FNT");
@@ -134,24 +134,24 @@ int KyraEngine_v3::init() {
int KyraEngine_v3::go() {
uint8 *pal = _screen->getPalette(1);
assert(pal);
-
+
_mainMenuLogo = createWSAMovie();
assert(_mainMenuLogo);
_mainMenuLogo->open("REVENGE.WSA", 1, pal);
assert(_mainMenuLogo->opened());
-
+
bool running = true;
while (running && !_quitFlag) {
_screen->_curPage = 0;
_screen->clearPage(0);
pal[0] = pal[1] = pal[2] = 0;
-
+
_screen->setScreenPalette(pal);
-
+
// XXX
playMenuAudioFile();
-
+
_mainMenuLogo->setX(0); _mainMenuLogo->setY(0);
_mainMenuLogo->setDrawPage(0);
@@ -178,18 +178,18 @@ int KyraEngine_v3::go() {
// XXX
running = false;
break;
-
+
case 1:
playVQA("K3INTRO");
break;
-
+
case 2:
//delete _mainMenuLogo;
//_mainMenuLogo = 0;
//show load dialog
//running = false;
break;
-
+
case 3:
_soundDigital->beginFadeOut(_musicSoundChannel);
_screen->fadeToBlack();
@@ -197,7 +197,7 @@ int KyraEngine_v3::go() {
_musicSoundChannel = -1;
running = false;
break;
-
+
default:
break;
}
@@ -255,19 +255,19 @@ void KyraEngine_v3::playMenuAudioFile() {
void KyraEngine_v3::playMusicTrack(int track, int force) {
debugC(9, kDebugLevelMain, "KyraEngine::playMusicTrack(%d, %d)", track, force);
-
+
// XXX byte_2C87C compare
-
+
if (_musicSoundChannel != -1 && !_soundDigital->isPlaying(_musicSoundChannel))
force = 1;
else if (_musicSoundChannel == -1)
force = 1;
-
+
if (track == _curMusicTrack && !force)
return;
-
+
stopMusicTrack();
-
+
if (_musicSoundChannel == -1) {
assert(track < _soundListSize && track >= 0);
@@ -279,7 +279,7 @@ void KyraEngine_v3::playMusicTrack(int track, int force) {
else
delete handle;
}
-
+
_musicSoundChannel = track;
}
@@ -287,21 +287,21 @@ void KyraEngine_v3::stopMusicTrack() {
if (_musicSoundChannel != -1 && _soundDigital->isPlaying(_musicSoundChannel)) {
_soundDigital->stopSound(_musicSoundChannel);
}
-
+
_curMusicTrack = -1;
_musicSoundChannel = -1;
}
int KyraEngine_v3::musicUpdate(int forceRestart) {
debugC(9, kDebugLevelMain, "KyraEngine::unkUpdate(%d)", forceRestart);
-
+
static uint32 mTimer = 0;
static uint16 lock = 0;
if (ABS<int>(_system->getMillis() - mTimer) > (int)(0x0F * _tickLength)) {
mTimer = _system->getMillis();
}
-
+
if (_system->getMillis() < mTimer && !forceRestart) {
return 1;
}
@@ -318,7 +318,7 @@ int KyraEngine_v3::musicUpdate(int forceRestart) {
lock = 0;
mTimer = _system->getMillis() + 0x0F * _tickLength;
}
-
+
return 1;
}
@@ -332,17 +332,17 @@ void KyraEngine_v3::gui_initMainMenu() {
void KyraEngine_v3::gui_updateMainMenuAnimation() {
uint32 nextRun = 0;
-
+
uint32 now = _system->getMillis();
if (now < nextRun)
return;
// yes 2 * _tickLength here not 3 * like in the first draw
nextRun = now + 2 * _tickLength;
-
+
_mainMenuLogo->displayFrame(_mainMenuFrame);
_screen->updateScreen();
-
+
_mainMenuFrame += _mainMenuFrameAdd;
if (_mainMenuFrame < 29) {
_mainMenuFrame = 29;
@@ -351,7 +351,7 @@ void KyraEngine_v3::gui_updateMainMenuAnimation() {
_mainMenuFrame = 64;
_mainMenuFrameAdd = -1;
}
-
+
// XXX
}
@@ -367,17 +367,17 @@ void KyraEngine_v3::preinit() {
// XXX
setGameFlag(0x216);
-
+
_unkPage1 = new uint8[64000];
assert(_unkPage1);
-
+
musicUpdate(0);
musicUpdate(0);
-
+
_interfaceCPS1 = new uint8[17920];
_interfaceCPS2 = new uint8[3840];
assert(_interfaceCPS1 && _interfaceCPS2);
-
+
_screen->setFont(Screen::FID_6_FNT);
}
diff --git a/engines/kyra/kyra_v3.h b/engines/kyra/kyra_v3.h
index f0c3f3b2dd..78ce6382a4 100644
--- a/engines/kyra/kyra_v3.h
+++ b/engines/kyra/kyra_v3.h
@@ -53,14 +53,14 @@ private:
void setupOpcodeTable() {}
SoundDigital *_soundDigital;
-
+
// sound specific
private:
void playMenuAudioFile();
-
+
int _musicSoundChannel;
const char *_menuAudioFile;
-
+
static const char *_soundList[];
static const int _soundListSize;
diff --git a/engines/kyra/module.mk b/engines/kyra/module.mk
index b5bf5ab73b..e631ddf5dd 100644
--- a/engines/kyra/module.mk
+++ b/engines/kyra/module.mk
@@ -48,5 +48,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 57094d8e68..b6d3bfe57a 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -63,7 +63,7 @@ bool Resource::reset() {
unloadAllPakFiles();
FilesystemNode dir(ConfMan.get("path"));
-
+
if (!dir.exists() || !dir.isDirectory())
error("invalid game path '%s'", dir.getPath().c_str());
@@ -179,7 +179,7 @@ bool Resource::loadPakFile(const Common::String &filename) {
bool Resource::loadFileList(const Common::String &filedata) {
Common::File f;
-
+
if (!f.open(filedata))
return false;
@@ -200,7 +200,7 @@ bool Resource::loadFileList(const Common::String &filedata) {
error("couldn't load file '%s'", filename.c_str());
return false;
}
- }
+ }
}
return true;
diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp
index 22cf2e0f2b..f3e41b2d39 100644
--- a/engines/kyra/scene.cpp
+++ b/engines/kyra/scene.cpp
@@ -33,12 +33,12 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move
x &= 0xFFFC; toX &= 0xFFFC;
y &= 0xFFFE; toY &= 0xFFFE;
x = (int16)x; y = (int16)y; toX = (int16)toX; toY = (int16)toY;
-
+
if (x == toY && y == toY) {
moveTable[0] = 8;
return 0;
}
-
+
int curX = x;
int curY = y;
int tempValue = 0;
@@ -46,7 +46,7 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move
int *pathTable1 = new int[0x7D0];
int *pathTable2 = new int[0x7D0];
assert(pathTable1 && pathTable2);
-
+
while (true) {
int newFacing = getFacingFromPointToPoint(x, y, toX, toY);
changePosTowardsFacing(curX, curY, newFacing);
@@ -86,7 +86,7 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move
screen()->updateScreen();
//waitTicks(5);
}*/
-
+
if (!lineIsPassable(curX, curY)) {
if (curX != toX || curY != toY)
continue;
@@ -99,7 +99,7 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move
break;
}
}
-
+
temp = findSubPath(x, y, curX, curY, pathTable1, 1, 0x7D0);
tempValue = findSubPath(x, y, curX, curY, pathTable2, 0, 0x7D0);
if (curX == toX && curY == toY) {
@@ -109,11 +109,11 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move
return 0x7D00;
}
}
-
+
if (temp != 0x7D00 || tempValue != 0x7D00)
break;
}
-
+
if (temp < tempValue) {
if (lastUsedEntry + temp > moveTableSize) {
delete [] pathTable1;
@@ -152,18 +152,18 @@ int KyraEngine::findSubPath(int x, int y, int toX, int toY, int *moveTable, int
static const int8 facingTable3[] = { 2, 4, 4, 6, 6, 0, 0, 2, 6, 6, 0, 0, 2, 2, 4, 4 };
static const int8 addPosTableX[] = { -1, 0, -1, 4, -1, 0, -1, -4, -1, -4, -1, 0, -1, 4, -1, 0 };
static const int8 addPosTableY[] = { -1, 2, -1, 0, -1, -2, -1, 0, -1, 0, -1, 2, -1, 0, -1, -2 };
-
+
// debug specific
/*++unkTable[start];
while (screen()->getPalette(0)[unkTable[start]] != 0x0F) {
++unkTable[start];
}*/
-
+
int xpos1 = x, xpos2 = x;
int ypos1 = y, ypos2 = y;
int newFacing = getFacingFromPointToPoint(x, y, toX, toY);
int position = 0;
-
+
while (position != end) {
int newFacing2 = newFacing;
while (true) {
@@ -202,7 +202,7 @@ int KyraEngine::findSubPath(int x, int y, int toX, int toY, int *moveTable, int
if (x == toX && y == toY)
return position;
-
+
if (xpos1 == xpos2 && ypos1 == ypos2)
break;
@@ -217,21 +217,21 @@ int KyraEngine::getFacingFromPointToPoint(int x, int y, int toX, int toY) {
static const int facingTable[] = {
1, 0, 1, 2, 3, 4, 3, 2, 7, 0, 7, 6, 5, 4, 5, 6
};
-
+
int facingEntry = 0;
int ydiff = y - toY;
if (ydiff < 0) {
++facingEntry;
ydiff = -ydiff;
- }
+ }
facingEntry <<= 1;
-
+
int xdiff = toX - x;
if (xdiff < 0) {
++facingEntry;
xdiff = -xdiff;
}
-
+
if (xdiff >= ydiff) {
int temp = ydiff;
ydiff = xdiff;
@@ -243,7 +243,7 @@ int KyraEngine::getFacingFromPointToPoint(int x, int y, int toX, int toY) {
facingEntry += 1;
}
int temp = (ydiff + 1) >> 1;
-
+
if (xdiff < temp) {
facingEntry <<= 1;
facingEntry += 1;
@@ -290,7 +290,7 @@ int KyraEngine::getMoveTableSize(int *moveTable) {
int retValue = 0;
if (moveTable[0] == 8)
return 0;
-
+
static const int facingTable[] = {
4, 5, 6, 7, 0, 1, 2, 3
};
@@ -304,7 +304,7 @@ int KyraEngine::getMoveTableSize(int *moveTable) {
7, 0, -1, 4, 5, -1, -1, -1,
-1, -1, 0, -1, 6, -1, -1, -1
};
-
+
int *oldPosition = moveTable;
int *tempPosition = moveTable;
int *curPosition = moveTable + 1;
@@ -315,13 +315,13 @@ int KyraEngine::getMoveTableSize(int *moveTable) {
retValue -= 2;
*oldPosition = 9;
*curPosition = 9;
-
+
while (tempPosition != moveTable) {
--tempPosition;
if (*tempPosition != 9)
break;
}
-
+
if (tempPosition == moveTable && *tempPosition == 9) {
while (*tempPosition != 8 && *tempPosition == 9)
++tempPosition;
@@ -329,7 +329,7 @@ int KyraEngine::getMoveTableSize(int *moveTable) {
if (*tempPosition == 8)
return 0;
}
-
+
oldPosition = tempPosition;
curPosition = oldPosition+1;
@@ -338,12 +338,12 @@ int KyraEngine::getMoveTableSize(int *moveTable) {
continue;
}
-
+
if (unkTable[*curPosition+((*oldPosition)*8)] != -1) {
--retValue;
*oldPosition = unkTable[*curPosition+((*oldPosition)*8)];
*curPosition = 9;
-
+
if (tempPosition != oldPosition) {
curPosition = oldPosition;
oldPosition = tempPosition;
@@ -365,7 +365,7 @@ int KyraEngine::getMoveTableSize(int *moveTable) {
}
continue;
}
-
+
tempPosition = oldPosition;
oldPosition = curPosition;
++retValue;
diff --git a/engines/kyra/scene_v1.cpp b/engines/kyra/scene_v1.cpp
index d5726fa57b..ce64269ba1 100644
--- a/engines/kyra/scene_v1.cpp
+++ b/engines/kyra/scene_v1.cpp
@@ -64,13 +64,13 @@ void KyraEngine_v1::enterNewScene(int sceneId, int facing, int unk1, int unk2, i
newSfxFile = 2;
else if (_currentCharacter->sceneId == 24 && sceneId == 7)
newSfxFile = 1;
-
+
if (newSfxFile != -1) {
_curSfxFile = newSfxFile;
_sound->loadSoundFile(_curSfxFile);
}
}
-
+
switch (_currentCharacter->sceneId) {
case 1:
if (sceneId == 0) {
@@ -103,7 +103,7 @@ void KyraEngine_v1::enterNewScene(int sceneId, int facing, int unk1, int unk2, i
default:
break;
}
-
+
if (unkVar1 && unk1) {
int xpos = _currentCharacter->x1;
int ypos = _currentCharacter->y1;
@@ -127,32 +127,32 @@ void KyraEngine_v1::enterNewScene(int sceneId, int facing, int unk1, int unk2, i
default:
break;
}
-
+
moveCharacterToPos(0, facing, xpos, ypos);
}
-
+
for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i)
_movieObjects[i]->close();
-
+
if (!brandonAlive) {
_scriptInterpreter->initScript(_scriptClick, _scriptClickData);
_scriptInterpreter->startScript(_scriptClick, 5);
while (_scriptInterpreter->validScript(_scriptClick))
_scriptInterpreter->runScript(_scriptClick);
}
-
+
memset(_entranceMouseCursorTracks, 0xFFFF, sizeof(uint16)*4);
_currentCharacter->sceneId = sceneId;
-
+
assert(sceneId < _roomTableSize);
assert(_roomTable[sceneId].nameIndex < _roomFilenameTableSize);
Room *currentRoom = &_roomTable[sceneId];
-
+
setupSceneResource(sceneId);
-
+
_currentRoom = sceneId;
-
+
int tableId = _roomTable[sceneId].nameIndex;
char fileNameBuffer[32];
strcpy(fileNameBuffer, _roomFilenameTable[tableId]);
@@ -161,12 +161,12 @@ void KyraEngine_v1::enterNewScene(int sceneId, int facing, int unk1, int unk2, i
_sprites->setupSceneAnims();
_scriptInterpreter->unloadScript(_scriptClickData);
loadSceneMsc();
-
+
_walkBlockNorth = currentRoom->northExit;
_walkBlockEast = currentRoom->eastExit;
_walkBlockSouth = currentRoom->southExit;
_walkBlockWest = currentRoom->westExit;
-
+
if (_walkBlockNorth == 0xFFFF)
_screen->blockOutRegion(0, 0, 320, (_northExitHeight & 0xFF)+3);
if (_walkBlockEast == 0xFFFF)
@@ -175,15 +175,15 @@ void KyraEngine_v1::enterNewScene(int sceneId, int facing, int unk1, int unk2, i
_screen->blockOutRegion(0, 135, 320, 8);
if (_walkBlockWest == 0xFFFF)
_screen->blockOutRegion(0, 0, 8, 139);
-
+
if (!brandonAlive)
updatePlayerItemsForScene();
startSceneScript(brandonAlive);
setupSceneItems();
-
+
initSceneData(facing, unk2, brandonAlive);
-
+
_loopFlag2 = 0;
_screen->showMouse();
if (!brandonAlive)
@@ -244,15 +244,15 @@ void KyraEngine_v1::moveCharacterToPos(int character, int facing, int xpos, int
delayUntil(nextFrame, true);
}
break;
-
- case 2:
+
+ case 2:
while (ch->x1 < xpos) {
nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis();
setCharacterPositionWithUpdate(character);
delayUntil(nextFrame, true);
}
break;
-
+
case 4:
while (ypos > ch->y1) {
nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis();
@@ -260,7 +260,7 @@ void KyraEngine_v1::moveCharacterToPos(int character, int facing, int xpos, int
delayUntil(nextFrame, true);
}
break;
-
+
case 6:
while (ch->x1 > xpos) {
nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis();
@@ -268,7 +268,7 @@ void KyraEngine_v1::moveCharacterToPos(int character, int facing, int xpos, int
delayUntil(nextFrame, true);
}
break;
-
+
default:
break;
}
@@ -321,10 +321,10 @@ void KyraEngine_v1::setCharacterPositionHelper(int character, int *facingTable)
}
}
}
-
+
static uint8 facingIsZero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
static uint8 facingIsFour[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
-
+
if (facing == 0) {
++facingIsZero[character];
} else {
@@ -350,13 +350,13 @@ void KyraEngine_v1::setCharacterPositionHelper(int character, int *facingTable)
facing = 0;
resetTables = true;
}
-
+
if (resetTables) {
facingIsZero[character] = 0;
facingIsFour[character] = 0;
}
}
-
+
static const uint16 maxAnimationFrame[] = {
0x000F, 0x0031, 0x0055, 0x0000, 0x0000, 0x0000,
0x0008, 0x002A, 0x004E, 0x0000, 0x0000, 0x0000,
@@ -366,7 +366,7 @@ void KyraEngine_v1::setCharacterPositionHelper(int character, int *facingTable)
0x0028, 0x004C, 0x0070, 0x0000, 0x0000, 0x0000,
0x0023, 0x0047, 0x006B, 0x0000, 0x0000, 0x0000
};
-
+
if (facing == 0) {
if (maxAnimationFrame[36+character] > ch->currentAnimFrame)
ch->currentAnimFrame = maxAnimationFrame[36+character];
@@ -385,10 +385,10 @@ void KyraEngine_v1::setCharacterPositionHelper(int character, int *facingTable)
if (maxAnimationFrame[character] < ch->currentAnimFrame)
ch->currentAnimFrame = maxAnimationFrame[6+character]+2;
}
-
+
if (character == 0 && (_brandonStatusBit & 0x10))
ch->currentAnimFrame = 88;
-
+
_animator->animRefreshNPC(character);
}
@@ -416,11 +416,11 @@ void KyraEngine_v1::startSceneScript(int brandonAlive) {
_screen->loadBitmap(fileNameBuffer, 3, 3, (_flags.platform == Common::kPlatformAmiga ? _screen->getPalette(0) : 0));
_sprites->loadSceneShapes();
_exitListPtr = 0;
-
- _scaleMode = 1;
+
+ _scaleMode = 1;
for (int i = 0; i < 145; ++i)
_scaleTable[i] = 256;
-
+
clearNoDropRects();
_scriptInterpreter->initScript(_scriptClick, _scriptClickData);
strcpy(fileNameBuffer, _roomFilenameTable[tableId]);
@@ -430,19 +430,19 @@ void KyraEngine_v1::startSceneScript(int brandonAlive) {
_scriptInterpreter->startScript(_scriptClick, 0);
_scriptClick->regs[0] = _currentCharacter->sceneId;
_scriptClick->regs[7] = brandonAlive;
-
+
while (_scriptInterpreter->validScript(_scriptClick))
_scriptInterpreter->runScript(_scriptClick);
}
void KyraEngine_v1::initSceneData(int facing, int unk1, int brandonAlive) {
debugC(9, kDebugLevelMain, "KyraEngine_v1::initSceneData(%d, %d, %d)", facing, unk1, brandonAlive);
-
+
int16 xpos2 = 0;
int setFacing = 1;
-
+
int16 xpos = 0, ypos = 0;
-
+
if (_brandonPosX == -1 && _brandonPosY == -1) {
switch (facing + 1) {
case 0:
@@ -472,7 +472,7 @@ void KyraEngine_v1::initSceneData(int facing, int unk1, int brandonAlive) {
default:
break;
}
-
+
if ((uint8)(_northExitHeight & 0xFF) + 2 >= ypos)
ypos = (_northExitHeight & 0xFF) + 4;
if (xpos >= 308)
@@ -482,12 +482,12 @@ void KyraEngine_v1::initSceneData(int facing, int unk1, int brandonAlive) {
if (xpos <= 12)
xpos = 16;
}
-
+
if (_brandonPosX > -1)
xpos = _brandonPosX;
if (_brandonPosY > -1)
ypos = _brandonPosY;
-
+
int16 ypos2 = 0;
if (_brandonPosX > -1 && _brandonPosY > -1) {
switch (_currentCharacter->sceneId) {
@@ -555,9 +555,9 @@ void KyraEngine_v1::initSceneData(int facing, int unk1, int brandonAlive) {
break;
}
}
-
+
_brandonPosX = _brandonPosY = -1;
-
+
if (unk1 && setFacing) {
ypos2 = ypos;
xpos2 = xpos;
@@ -582,7 +582,7 @@ void KyraEngine_v1::initSceneData(int facing, int unk1, int brandonAlive) {
break;
}
}
-
+
xpos2 = (int16)(xpos2 & 0xFFFC);
ypos2 = (int16)(ypos2 & 0xFFFE);
xpos = (int16)(xpos & 0xFFFC);
@@ -592,12 +592,12 @@ void KyraEngine_v1::initSceneData(int facing, int unk1, int brandonAlive) {
_currentCharacter->x2 = xpos;
_currentCharacter->y1 = ypos;
_currentCharacter->y2 = ypos;
-
+
initSceneObjectList(brandonAlive);
-
+
if (unk1 && brandonAlive == 0)
moveCharacterToPos(0, facing, xpos2, ypos2);
-
+
_scriptClick->regs[4] = _itemInHand;
_scriptClick->regs[7] = brandonAlive;
_scriptInterpreter->startScript(_scriptClick, 3);
@@ -609,9 +609,9 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
debugC(9, kDebugLevelMain, "KyraEngine_v1::initSceneObjectList(%d)", brandonAlive);
for (int i = 0; i < 28; ++i)
_animator->actors()[i].active = 0;
-
+
int startAnimFrame = 0;
-
+
AnimObject *curAnimState = _animator->actors();
curAnimState->active = 1;
curAnimState->drawY = _currentCharacter->y1;
@@ -624,10 +624,10 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
if (_scaleMode) {
curAnimState->x1 = _currentCharacter->x1;
curAnimState->y1 = _currentCharacter->y1;
-
+
_animator->_brandonScaleX = _scaleTable[_currentCharacter->y1];
_animator->_brandonScaleY = _scaleTable[_currentCharacter->y1];
-
+
curAnimState->x1 += (_animator->_brandonScaleX * xOffset) >> 8;
curAnimState->y1 += (_animator->_brandonScaleY * yOffset) >> 8;
} else {
@@ -641,10 +641,10 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
curAnimState->bkgdChangeFlag = 1;
_animator->clearQueue();
_animator->addObjectToQueue(curAnimState);
-
+
int listAdded = 0;
int addedObjects = 1;
-
+
for (int i = 1; i < 5; ++i) {
Character *ch = &_characterList[i];
curAnimState = &_animator->actors()[addedObjects];
@@ -655,7 +655,7 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
++addedObjects;
continue;
}
-
+
curAnimState->drawY = ch->y1;
curAnimState->sceneAnimPtr = _shapes[ch->currentAnimFrame];
curAnimState->animFrameNumber = ch->currentAnimFrame;
@@ -665,10 +665,10 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
if (_scaleMode) {
curAnimState->x1 = ch->x1;
curAnimState->y1 = ch->y1;
-
+
_animator->_brandonScaleX = _scaleTable[ch->y1];
_animator->_brandonScaleY = _scaleTable[ch->y1];
-
+
curAnimState->x1 += (_animator->_brandonScaleX * xOffset) >> 8;
curAnimState->y1 += (_animator->_brandonScaleY * yOffset) >> 8;
} else {
@@ -680,20 +680,20 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
curAnimState->active = 1;
curAnimState->refreshFlag = 1;
curAnimState->bkgdChangeFlag = 1;
-
+
if (ch->facing >= 1 && ch->facing <= 3)
curAnimState->flags |= 1;
else if (ch->facing >= 5 && ch->facing <= 7)
curAnimState->flags &= 0xFFFFFFFE;
-
+
_animator->addObjectToQueue(curAnimState);
-
+
++addedObjects;
++listAdded;
if (listAdded < 2)
i = 5;
}
-
+
for (int i = 0; i < 11; ++i) {
curAnimState = &_animator->sprites()[i];
@@ -715,9 +715,9 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
curAnimState->y1 = curAnimState->y2 = _sprites->_anims[i].y;
curAnimState->background = _sprites->_anims[i].background;
curAnimState->sceneAnimPtr = _sprites->_sceneShapes[_sprites->_anims[i].sprite];
-
+
curAnimState->disable = _sprites->_anims[i].disable;
-
+
if (_sprites->_anims[i].unk2)
curAnimState->flags = 0x800;
else
@@ -725,10 +725,10 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
if (_sprites->_anims[i].flipX)
curAnimState->flags |= 0x1;
-
+
_animator->addObjectToQueue(curAnimState);
}
-
+
for (int i = 0; i < 12; ++i) {
curAnimState = &_animator->items()[i];
Room *curRoom = &_roomTable[_currentCharacter->sceneId];
@@ -739,17 +739,17 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
curAnimState->animFrameNumber = (int16)0xFFFF;
curAnimState->y1 = curRoom->itemsYPos[i];
curAnimState->x1 = curRoom->itemsXPos[i];
-
+
curAnimState->x1 -= (_animator->fetchAnimWidth(curAnimState->sceneAnimPtr, _scaleTable[curAnimState->drawY])) >> 1;
curAnimState->y1 -= _animator->fetchAnimHeight(curAnimState->sceneAnimPtr, _scaleTable[curAnimState->drawY]);
-
+
curAnimState->x2 = curAnimState->x1;
curAnimState->y2 = curAnimState->y1;
-
+
curAnimState->active = 1;
curAnimState->refreshFlag = 1;
curAnimState->bkgdChangeFlag = 1;
-
+
_animator->addObjectToQueue(curAnimState);
} else {
curAnimState->active = 0;
@@ -757,7 +757,7 @@ void KyraEngine_v1::initSceneObjectList(int brandonAlive) {
curAnimState->bkgdChangeFlag = 0;
}
}
-
+
_animator->preserveAnyChangedBackgrounds();
curAnimState = _animator->actors();
curAnimState->bkgdChangeFlag = 1;
@@ -839,7 +839,7 @@ void KyraEngine_v1::initSceneScreen(int brandonAlive) {
if (_currentCharacter->sceneId == 210) {
if (_itemInHand != -1)
magicOutMouseItem(2, -1);
-
+
_screen->hideMouse();
for (int i = 0; i < 10; ++i) {
if (_currentCharacter->inventoryItems[i] != 0xFF)
@@ -870,7 +870,7 @@ int KyraEngine_v1::handleSceneChange(int xpos, int ypos, int unk1, int frameRese
_pathfinderFlag = 13;
}
}
-
+
if (ypos <= (_northExitHeight&0xFF)+2) {
if (_roomTable[sceneId].northExit != 0xFFFF) {
xpos = _sceneExits.northXPos;
@@ -884,19 +884,19 @@ int KyraEngine_v1::handleSceneChange(int xpos, int ypos, int unk1, int frameRese
_pathfinderFlag = 11;
}
}
-
+
int temp = xpos - _currentCharacter->x1;
if (ABS(temp) < 4) {
temp = ypos - _currentCharacter->y1;
if (ABS(temp) < 2)
return 0;
}
-
+
int x = (int16)(_currentCharacter->x1 & 0xFFFC);
int y = (int16)(_currentCharacter->y1 & 0xFFFE);
xpos = (int16)(xpos & 0xFFFC);
ypos = (int16)(ypos & 0xFFFE);
-
+
int ret = findWay(x, y, xpos, ypos, _movFacingTable, 150);
_pathfinderFlag = 0;
@@ -950,23 +950,23 @@ int KyraEngine_v1::processSceneChange(int *table, int unk1, int frameReset) {
forceContinue = true;
break;
}
-
+
returnValue = changeScene(_currentCharacter->facing);
if (returnValue) {
running = false;
_abortWalkFlag = false;
}
-
+
if (unk1) {
if (_mousePressFlag) {
running = false;
_sceneChangeState = 1;
}
}
-
+
if (forceContinue || !running)
continue;
-
+
int temp = 0;
if (table == tableStart || table[1] == 8)
temp = setCharacterPosition(0, 0);
@@ -975,7 +975,7 @@ int KyraEngine_v1::processSceneChange(int *table, int unk1, int frameReset) {
if (temp)
++table;
-
+
nextFrame = _timer->getDelay(5) * _tickLength + _system->getMillis();
while (_system->getMillis() < nextFrame) {
_timer->update();
@@ -993,7 +993,7 @@ int KyraEngine_v1::processSceneChange(int *table, int unk1, int frameReset) {
delay(10, true);
}
}
-
+
if (frameReset && !(_brandonStatusBit & 2))
_currentCharacter->currentAnimFrame = 7;
@@ -1008,22 +1008,22 @@ int KyraEngine_v1::changeScene(int facing) {
if (_currentCharacter->sceneId == 5)
return 0;
}
-
+
int xpos = _charXPosTable[facing] + _currentCharacter->x1;
int ypos = _charYPosTable[facing] + _currentCharacter->y1;
-
+
if (xpos >= 12 && xpos <= 308) {
if (!lineIsPassable(xpos, ypos))
return false;
}
-
+
if (_exitListPtr) {
int16 *ptr = _exitListPtr;
// this loop should be only entered one time, seems to be some hack in the original
while (true) {
if (*ptr == -1)
break;
-
+
if (*ptr > _currentCharacter->x1 || _currentCharacter->y1 < ptr[1] || _currentCharacter->x1 > ptr[2] || _currentCharacter->y1 > ptr[3]) {
ptr += 10;
break;
@@ -1058,7 +1058,7 @@ int KyraEngine_v1::changeScene(int facing) {
break;
}
}
-
+
_currentCharacter->facing = facing;
_animator->animRefreshNPC(0);
_animator->updateAllObjectShapes();
@@ -1067,33 +1067,33 @@ int KyraEngine_v1::changeScene(int facing) {
return 1;
}
}
-
+
int returnValue = 0;
facing = 0;
-
+
if ((_northExitHeight & 0xFF) + 2 >= ypos || (_northExitHeight & 0xFF) + 2 >= _currentCharacter->y1) {
facing = 0;
returnValue = 1;
}
-
+
if (xpos >= 308 || (_currentCharacter->x1 + 4) >= 308) {
facing = 2;
returnValue = 1;
}
-
+
if (((_northExitHeight >> 8) & 0xFF) - 2 < ypos || ((_northExitHeight >> 8) & 0xFF) - 2 < _currentCharacter->y1) {
facing = 4;
returnValue = 1;
}
-
+
if (xpos <= 12 || _currentCharacter->y1 <= 12) {
facing = 6;
returnValue = 1;
}
-
+
if (!returnValue)
return 0;
-
+
uint16 sceneId = 0xFFFF;
switch (facing) {
case 0:
@@ -1112,7 +1112,7 @@ int KyraEngine_v1::changeScene(int facing) {
sceneId = _roomTable[_currentCharacter->sceneId].westExit;
break;
}
-
+
if (sceneId == 0xFFFF)
return 0;
@@ -1127,7 +1127,7 @@ void KyraEngine_v1::setCharactersInDefaultScene() {
{ 0xFFFF, 0x001D, 0x0021, 0xFFFF },
{ 0xFFFF, 0x0000, 0x0000, 0xFFFF }
};
-
+
for (int i = 1; i < 5; ++i) {
Character *cur = &_characterList[i];
//cur->field_20 = 0;
@@ -1178,49 +1178,49 @@ bool KyraEngine_v1::lineIsPassable(int x, int y) {
if (_currentCharacter->sceneId == 5)
return true;
}
-
+
if (_pathfinderFlag & 2) {
if (x >= 312)
return false;
}
-
+
if (_pathfinderFlag & 4) {
if (y >= 136)
return false;
}
-
+
if (_pathfinderFlag & 8) {
if (x < 8)
return false;
}
-
+
if (_pathfinderFlag2) {
if (x <= 8 || x >= 312)
return true;
if (y < (_northExitHeight & 0xFF) || y > 135)
return true;
}
-
+
if (y > 137)
return false;
if (y < 0)
y = 0;
-
+
int ypos = 8;
if (_scaleMode) {
ypos = (_scaleTable[y] >> 5) + 1;
if (8 < ypos)
ypos = 8;
}
-
+
x -= (ypos >> 1);
-
+
int xpos = x;
int xtemp = xpos + ypos - 1;
if (x < 0)
xpos = 0;
-
+
if (xtemp > 319)
xtemp = 319;
diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp
index b9ed041206..63664c91d8 100644
--- a/engines/kyra/scene_v2.cpp
+++ b/engines/kyra/scene_v2.cpp
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#include "kyra/kyra_v2.h"
#include "kyra/screen_v2.h"
#include "kyra/sound.h"
@@ -45,12 +45,12 @@ void KyraEngine_v2::enterNewScene(uint16 newScene, int facing, int unk1, int unk
}
_screen->hideMouse();
-
+
if (!unk3) {
//updateSpecialItems();
//displayInvWsaLastFrame();
}
-
+
if (unk1) {
int x = _mainCharacter.x1;
int y = _mainCharacter.y1;
@@ -71,60 +71,60 @@ void KyraEngine_v2::enterNewScene(uint16 newScene, int facing, int unk1, int unk
case 6:
x = -16;
break;
-
+
default:
break;
}
-
+
moveCharacter(facing, x, y);
}
-
+
bool newSoundFile = false;
if (_sceneList[newScene].sound != _lastMusicCommand) {
newSoundFile = true;
//XXX
_sound->beginFadeOut();
}
-
+
_unkFlag1 = false;
-
+
if (!unk3) {
_scriptInterpreter->initScript(&_sceneScriptState, &_sceneScriptData);
_scriptInterpreter->startScript(&_sceneScriptState, 5);
while (_scriptInterpreter->validScript(&_sceneScriptState))
_scriptInterpreter->runScript(&_sceneScriptState);
}
-
+
Common::for_each(_wsaSlots, _wsaSlots+ARRAYSIZE(_wsaSlots), Common::mem_fun(&WSAMovieV2::close));
_specialExitCount = 0;
memset(_specialExitTable, -1, sizeof(_specialExitTable));
-
+
_mainCharacter.sceneId = newScene;
_sceneList[newScene].flags &= ~1;
loadScenePal();
unloadScene();
loadSceneMsc();
-
+
SceneDesc &scene = _sceneList[newScene];
_sceneExit1 = scene.exit1;
_sceneExit2 = scene.exit2;
_sceneExit3 = scene.exit3;
_sceneExit4 = scene.exit4;
-
+
if (newSoundFile) {
//XXX while (snd_isPlaying()) ;
snd_loadSoundFile(_sceneList[newScene].sound);
}
-
+
startSceneScript(unk3);
-
+
if (_overwriteSceneFacing) {
facing = _mainCharacter.facing;
_overwriteSceneFacing = false;
}
-
+
enterNewSceneUnk1(facing, unk2, unk3);
-
+
setTimer1DelaySecs(-1);
_sceneScriptState.regs[3] = 1;
enterNewSceneUnk2(unk3);
@@ -139,34 +139,34 @@ void KyraEngine_v2::enterNewSceneUnk1(int facing, int unk1, int unk2) {
int x = 0, y = 0;
int x2 = 0, y2 = 0;
bool needProc = true;
-
+
if (_mainCharX == -1 && _mainCharY == -1) {
switch (facing+1) {
case 1: case 2: case 8:
x2 = _sceneEnterX3;
y2 = _sceneEnterY3;
break;
-
+
case 3:
x2 = _sceneEnterX4;
y2 = _sceneEnterY4;
break;
-
+
case 4: case 5: case 6:
x2 = _sceneEnterX1;
y2 = _sceneEnterY1;
break;
-
+
case 7:
x2 = _sceneEnterX2;
y2 = _sceneEnterY2;
break;
-
+
default:
x2 = y2 = -1;
break;
}
-
+
if (x2 >= 316)
x2 = 312;
if (y2 >= 141)
@@ -174,45 +174,45 @@ void KyraEngine_v2::enterNewSceneUnk1(int facing, int unk1, int unk2) {
if (x2 <= 4)
x2 = 8;
}
-
+
if (_mainCharX >= 0) {
x = x2 = _mainCharX;
needProc = false;
}
-
+
if (_mainCharY >= 0) {
y = y2 = _mainCharY;
needProc = false;
}
-
+
_mainCharX = _mainCharY = -1;
-
+
if (unk1 && needProc) {
x = x2;
y = y2;
-
+
switch (facing) {
case 0:
y2 = 147;
break;
-
+
case 2:
x2 = -16;
break;
-
+
case 4:
y2 = y - 4;
break;
-
+
case 6:
x2 = 335;
break;
-
+
default:
break;
}
}
-
+
x2 &= ~3;
x &= ~3;
y2 &= ~1;
@@ -222,17 +222,17 @@ void KyraEngine_v2::enterNewSceneUnk1(int facing, int unk1, int unk2) {
_mainCharacter.x1 = _mainCharacter.x2 = x2;
_mainCharacter.y1 = _mainCharacter.y2 = y2;
initSceneAnims(unk2);
-
+
if (!unk2)
snd_playWanderScoreViaMap(_sceneList[_mainCharacter.sceneId].sound, 0);
-
+
if (unk1 && !unk2 && _mainCharacter.animFrame != 32)
moveCharacter(facing, x, y);
}
void KyraEngine_v2::enterNewSceneUnk2(int unk1) {
_unk3 = -1;
-
+
if (_mainCharX == -1 && _mainCharY == -1 && _mainCharacter.sceneId != 61 &&
!queryGameFlag(0x1F1) && !queryGameFlag(0x192) && !queryGameFlag(0x193) &&
_mainCharacter.sceneId != 70 && !queryGameFlag(0x159) && _mainCharacter.sceneId != 37) {
@@ -240,12 +240,12 @@ void KyraEngine_v2::enterNewSceneUnk2(int unk1) {
updateCharacterAnim(0);
refreshAnimObjectsIfNeed();
}
-
+
if (!unk1) {
runSceneScript4(0);
//XXX sub_27158
}
-
+
_unk4 = 0;
_unk3 = -1;
}
@@ -269,12 +269,12 @@ int KyraEngine_v2::trySceneChange(int *moveTable, int unk1, int updateChar) {
unkFlag = false;
}
}
-
+
if (checkSceneChange()) {
running = false;
changedScene = 1;
}
-
+
if (unk1) {
// TODO: check this again
int inputFlag = checkInput(0/*dword_324C5*/);
@@ -283,7 +283,7 @@ int KyraEngine_v2::trySceneChange(int *moveTable, int unk1, int updateChar) {
_unk4 = 1;
}
}
-
+
if (!unkFlag || !running)
continue;
@@ -304,13 +304,13 @@ int KyraEngine_v2::trySceneChange(int *moveTable, int unk1, int updateChar) {
updateType = -1;
}
}
-
+
if (updateChar)
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
-
+
updateCharacterAnim(0);
refreshAnimObjectsIfNeed();
-
+
if (!changedScene && !_unk4) {
//XXX
}
@@ -322,7 +322,7 @@ int KyraEngine_v2::checkSceneChange() {
int charX = _mainCharacter.x1, charY = _mainCharacter.y1;
int facing = 0;
int process = 0;
-
+
if (_screen->getLayer(charX, charY) == 1 && _unk3 == -6) {
facing = 0;
process = 1;
@@ -336,36 +336,36 @@ int KyraEngine_v2::checkSceneChange() {
facing = 6;
process = 1;
}
-
+
if (!process)
return 0;
-
+
uint16 newScene = 0xFFFF;
switch (facing) {
case 0:
newScene = curScene.exit1;
break;
-
+
case 2:
newScene = curScene.exit2;
break;
-
+
case 4:
newScene = curScene.exit3;
break;
-
+
case 6:
newScene = curScene.exit4;
break;
-
+
default:
newScene = _mainCharacter.sceneId;
break;
}
-
+
if (newScene == 0xFFFF)
return 0;
-
+
enterNewScene(newScene, facing, 1, 1, 0);
return 1;
}
@@ -379,7 +379,7 @@ void KyraEngine_v2::unloadScene() {
void KyraEngine_v2::loadScenePal() {
uint16 sceneId = _mainCharacter.sceneId;
memcpy(_screen->getPalette(1), _screen->getPalette(0), 768);
-
+
char filename[14];
strcpy(filename, _sceneList[sceneId].filename);
strcat(filename, ".COL");
@@ -400,10 +400,10 @@ void KyraEngine_v2::loadSceneMsc() {
void KyraEngine_v2::startSceneScript(int unk1) {
uint16 sceneId = _mainCharacter.sceneId;
char filename[14];
-
+
strcpy(filename, _sceneList[sceneId].filename);
if (sceneId == 68 && (queryGameFlag(0x1BC) || queryGameFlag(0x1DC)))
- strcpy(filename, "DOORX");
+ strcpy(filename, "DOORX");
strcat(filename, ".CPS");
_screen->loadBitmap(filename, 3, 3, 0);
@@ -421,18 +421,18 @@ void KyraEngine_v2::startSceneScript(int unk1) {
_sceneEnterY3 = 128;
_sceneEnterX4 = 24;
_sceneEnterY4 = 72;
-
+
_sceneCommentString = "Undefined scene comment string!";
_scriptInterpreter->initScript(&_sceneScriptState, &_sceneScriptData);
-
+
strcpy(filename, _sceneList[sceneId].filename);
strcat(filename, ".");
strcat(filename, _scriptLangExt[(_flags.platform == Common::kPlatformPC && !_flags.isTalkie) ? 0 : _lang]);
-
+
assert(_res->getFileSize(filename));
_scriptInterpreter->loadScript(filename, &_sceneScriptData, &_opcodes);
runSceneScript7();
-
+
_scriptInterpreter->startScript(&_sceneScriptState, 0);
_sceneScriptState.regs[0] = sceneId;
_sceneScriptState.regs[5] = unk1;
@@ -440,13 +440,13 @@ void KyraEngine_v2::startSceneScript(int unk1) {
_scriptInterpreter->runScript(&_sceneScriptState);
memcpy(_gamePlayBuffer, _screen->getCPagePtr(3), 46080);
-
+
for (int i = 0; i < 10; ++i) {
_scriptInterpreter->initScript(&_sceneSpecialScripts[i], &_sceneScriptData);
_scriptInterpreter->startScript(&_sceneSpecialScripts[i], i+8);
_sceneSpecialScriptsTimer[i] = 0;
}
-
+
_sceneEnterX1 &= ~3;
_sceneEnterX2 &= ~3;
_sceneEnterX3 &= ~3;
@@ -461,7 +461,7 @@ void KyraEngine_v2::runSceneScript2() {
_scriptInterpreter->initScript(&_sceneScriptState, &_sceneScriptData);
_sceneScriptState.regs[4] = _itemInHand;
_scriptInterpreter->startScript(&_sceneScriptState, 2);
-
+
while (_scriptInterpreter->validScript(&_sceneScriptState))
_scriptInterpreter->runScript(&_sceneScriptState);
}
@@ -491,7 +491,7 @@ void KyraEngine_v2::runSceneScript6() {
void KyraEngine_v2::runSceneScript7() {
int oldPage = _screen->_curPage;
_screen->_curPage = 2;
-
+
_scriptInterpreter->startScript(&_sceneScriptState, 7);
while (_scriptInterpreter->validScript(&_sceneScriptState))
_scriptInterpreter->runScript(&_sceneScriptState);
@@ -502,32 +502,32 @@ void KyraEngine_v2::runSceneScript7() {
void KyraEngine_v2::initSceneAnims(int unk1) {
for (int i = 0; i < ARRAYSIZE(_animObjects); ++i)
_animObjects[i].enabled = 0;
-
+
bool animInit = false;
-
+
AnimObj *animState = &_animObjects[0];
-
+
if (_mainCharacter.animFrame != 32)
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
-
+
animState->enabled = 1;
animState->xPos1 = _mainCharacter.x1;
animState->yPos1 = _mainCharacter.y1;
animState->shapePtr = _defaultShapeTable[_mainCharacter.animFrame];
animState->shapeIndex1 = animState->shapeIndex2 = _mainCharacter.animFrame;
-
+
int frame = _mainCharacter.animFrame - 9;
int shapeX = _shapeDescTable[frame].xAdd;
int shapeY = _shapeDescTable[frame].yAdd;
-
+
animState->xPos2 = _mainCharacter.x1;
animState->yPos2 = _mainCharacter.y1;
-
+
_charScaleX = _charScaleY = getScale(_mainCharacter.x1, _mainCharacter.y1);
-
+
int shapeXScaled = (shapeX * _charScaleX) >> 8;
int shapeYScaled = (shapeY * _charScaleY) >> 8;
-
+
animState->xPos2 += shapeXScaled;
animState->yPos2 += shapeYScaled;
animState->xPos3 = animState->xPos2;
@@ -536,39 +536,39 @@ void KyraEngine_v2::initSceneAnims(int unk1) {
animState->unk8 = 1;
_animList = 0;
-
+
AnimObj *charAnimState = animState;
-
+
for (int i = 0; i < 10; ++i) {
animState = &_animObjects[i+1];
animState->enabled = 0;
animState->needRefresh = 0;
animState->unk8 = 0;
-
+
if (_sceneAnims[i].flags & 1) {
animState->enabled = 1;
animState->needRefresh = 1;
animState->unk8 = 1;
}
-
+
animState->animFlags = _sceneAnims[i].flags & 8;
-
+
if (_sceneAnims[i].flags & 2)
animState->flags = 0x800;
else
animState->flags = 0;
-
+
if (_sceneAnims[i].flags & 4)
animState->flags |= 1;
-
+
animState->xPos1 = _sceneAnims[i].x;
animState->yPos1 = _sceneAnims[i].y;
-
+
if (_sceneAnims[i].flags & 0x20)
animState->shapePtr = _sceneShapeTable[_sceneAnims[i].shapeIndex];
else
animState->shapePtr = 0;
-
+
if (_sceneAnims[i].flags & 0x40) {
animState->shapeIndex3 = _sceneAnims[i].shapeIndex;
animState->animNum = i;
@@ -576,15 +576,15 @@ void KyraEngine_v2::initSceneAnims(int unk1) {
animState->shapeIndex3 = 0xFFFF;
animState->animNum = 0xFFFF;
}
-
+
animState->shapeIndex2 = 0xFFFF;
-
+
animState->xPos3 = animState->xPos2 = _sceneAnims[i].x2;
animState->yPos3 = animState->yPos2 = _sceneAnims[i].y2;
animState->width = _sceneAnims[i].width;
animState->height = _sceneAnims[i].height;
animState->width2 = animState->height2 = _sceneAnims[i].specialSize;
-
+
if (_sceneAnims[i].flags & 1) {
if (animInit) {
_animList = addToAnimListSorted(_animList, animState);
@@ -594,17 +594,17 @@ void KyraEngine_v2::initSceneAnims(int unk1) {
}
}
}
-
+
if (animInit) {
_animList = addToAnimListSorted(_animList, charAnimState);
} else {
_animList = initAnimList(_animList, charAnimState);
animInit = true;
}
-
+
for (int i = 0; i < 30; ++i) {
animState = &_animObjects[i+11];
-
+
uint16 shapeIndex = _itemList[i].id;
if (shapeIndex == 0xFFFF || _itemList[i].sceneId != _mainCharacter.sceneId) {
animState->enabled = 0;
@@ -615,21 +615,21 @@ void KyraEngine_v2::initSceneAnims(int unk1) {
animState->yPos1 = _itemList[i].y;
animState->shapePtr = _defaultShapeTable[64+shapeIndex];
animState->shapeIndex1 = animState->shapeIndex2 = shapeIndex+64;
-
+
animState->xPos2 = _itemList[i].x;
animState->yPos2 = _itemList[i].y;
int objectScale = getScale(animState->xPos2, animState->yPos2);
-
+
const uint8 *shape = getShapePtr(animState->shapeIndex1);
animState->xPos2 -= (_screen->getShapeScaledWidth(shape, objectScale) >> 1);
animState->yPos2 -= (_screen->getShapeScaledHeight(shape, objectScale) >> 1);
animState->xPos3 = animState->xPos2;
animState->yPos3 = animState->yPos2;
-
+
animState->enabled = 1;
animState->needRefresh = 1;
animState->unk8 = 1;
-
+
if (animInit) {
_animList = addToAnimListSorted(_animList, animState);
} else {
@@ -638,17 +638,17 @@ void KyraEngine_v2::initSceneAnims(int unk1) {
}
}
}
-
+
_animObjects[0].unk8 = 1;
_animObjects[0].needRefresh = 1;
-
+
for (int i = 1; i < 41; ++i) {
if (_animObjects[i].enabled) {
_animObjects[i].needRefresh = 1;
_animObjects[i].unk8 = 1;
}
}
-
+
restorePage3();
drawAnimObjects();
_screen->hideMouse();
@@ -686,23 +686,23 @@ void KyraEngine_v2::updateSpecialSceneScripts() {
const int startScript = _lastProcessedSceneScript;
while (_system->getMillis() <= nextTime) {
- if (_sceneSpecialScriptsTimer[_lastProcessedSceneScript] <= _system->getMillis() &&
+ if (_sceneSpecialScriptsTimer[_lastProcessedSceneScript] <= _system->getMillis() &&
!_specialSceneScriptState[_lastProcessedSceneScript]) {
_specialSceneScriptRunFlag = true;
-
+
while (_specialSceneScriptRunFlag && _sceneSpecialScriptsTimer[_lastProcessedSceneScript] <= _system->getMillis())
_specialSceneScriptRunFlag = _scriptInterpreter->runScript(&_sceneSpecialScripts[_lastProcessedSceneScript]) != 0;
}
-
+
if (!_scriptInterpreter->validScript(&_sceneSpecialScripts[_lastProcessedSceneScript])) {
_scriptInterpreter->startScript(&_sceneSpecialScripts[_lastProcessedSceneScript], 8+_lastProcessedSceneScript);
_specialSceneScriptRunFlag = false;
}
-
+
++_lastProcessedSceneScript;
if (_lastProcessedSceneScript >= 10)
_lastProcessedSceneScript = 0;
-
+
if (_lastProcessedSceneScript == startScript)
return;
}
@@ -743,22 +743,22 @@ bool KyraEngine_v2::lineIsPassable(int x, int y) {
if (x >= 320)
return false;
}
-
+
if (_pathfinderFlag & 4) {
if (y >= 144)
return false;
}
-
+
if (_pathfinderFlag & 8) {
if (x < 0)
return false;
}
-
+
if (y > 143)
return false;
int unk1 = unkTable[getScale(x, y) >> 5];
-
+
if (y < 0)
y = 0;
x -= unk1 >> 1;
@@ -767,7 +767,7 @@ bool KyraEngine_v2::lineIsPassable(int x, int y) {
int x2 = x + unk1;
if (x2 > 320)
x2 = 320;
-
+
for (;x < x2; ++x)
if (!_screen->getShapeFlag1(x, y))
return false;
@@ -793,15 +793,15 @@ int KyraEngine_v2::pathfinderUnk1(int *moveTable) {
int oldX = 0, newX = 0, oldY = 0, newY = 0;
int lastEntry = 0;
lastEntry = pathfinderUnk2(lastEntry, 0, 0);
-
+
while (*moveTableCur != 8) {
oldEntry = curEntry;
-
+
while (true) {
curEntry = *moveTableCur;
if (curEntry >= 0 && curEntry <= 7)
break;
-
+
if (curEntry == 8) {
breakLoop = true;
break;
@@ -809,27 +809,27 @@ int KyraEngine_v2::pathfinderUnk1(int *moveTable) {
++moveTableCur;
}
}
-
+
if (breakLoop)
break;
-
+
oldX = newX;
oldY = newY;
-
+
newX += _addXPosTable[curEntry];
newY += _addYPosTable[curEntry];
-
+
int temp = ABS(curEntry - oldEntry);
if (temp > 4) {
temp = 8 - temp;
}
-
+
if (temp > 1 || oldEntry != curEntry)
lastEntry = pathfinderUnk2(lastEntry, oldX, oldY);
-
+
++moveTableCur;
}
-
+
lastEntry = pathfinderUnk2(lastEntry, newX, newY);
_pathfinderUnkTable1[lastEntry*2+0] = -1;
_pathfinderUnkTable1[lastEntry*2+1] = -1;
@@ -855,7 +855,7 @@ int KyraEngine_v2::pathfinderUnk3(int tableLen, int x, int y) {
y1 = _pathfinderUnkTable1[index1*2+1] + y;
x2 = _pathfinderUnkTable1[index2*2+0] + x;
y2 = _pathfinderUnkTable1[index2*2+0] + x;
-
+
if (directLinePassable(x1, y1, x2, y2)) {
lastEntry = pathfinderUnk4(lastEntry, index2);
if (tableLen-1 == index2)
@@ -892,7 +892,7 @@ void KyraEngine_v2::pathfinderUnk5(int *moveTable, int tableLen, int x, int y, i
y1 = _pathfinderUnkTable1[index1*2+1] + y;
x2 = _pathfinderUnkTable1[index2*2+0] + x;
y2 = _pathfinderUnkTable1[index2*2+0] + x;
-
+
int wayLen = findWay(x1, y1, x2, y2, moveTable, sizeLeft);
moveTable += wayLen;
sizeLeft -= wayLen; // unlike the original we want to be sure that the size left is correct
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index c5cd09756f..546ab6f6a5 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -589,7 +589,7 @@ void Screen::copyRegionToBuffer(int pageNum, int x, int y, int w, int h, uint8 *
if (x < 0) {
dest += -x;
- w += x;
+ w += x;
x = 0;
} else if (x + w > SCREEN_W) {
w = SCREEN_W - x;
@@ -627,7 +627,7 @@ void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint
if (x < 0) {
src += -x;
- w += x;
+ w += x;
x = 0;
} else if (x + w > SCREEN_W) {
w = SCREEN_W - x;
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index 3808087a4b..0c9bc98b1c 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -85,7 +85,7 @@ public:
DSF_WND_COORDS = 0x10,
DSF_CENTER = 0x20
};
-
+
enum FontId {
FID_6_FNT = 0,
FID_8_FNT,
@@ -95,7 +95,7 @@ public:
FID_GOLDFONT_FNT,
FID_NUM
};
-
+
Screen(KyraEngine *vm, OSystem *system);
virtual ~Screen();
@@ -181,7 +181,7 @@ public:
// mouse handling
void hideMouse();
void showMouse();
- void setMouseCursor(int x, int y, byte *shape);
+ void setMouseCursor(int x, int y, byte *shape);
// rect handling
virtual int getRectSize(int w, int h);
@@ -191,7 +191,7 @@ public:
void addBitBlitRect(int x, int y, int w, int h);
void bitBlitRects();
- // misc
+ // misc
void loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *palData);
void loadPalette(const char *filename, uint8 *palData);
@@ -200,10 +200,10 @@ public:
void setAnimBlockPtr(int size);
void setShapePages(int page1, int page2);
-
+
byte getShapeFlag1(int x, int y);
byte getShapeFlag2(int x, int y);
-
+
void savePageToDisk(const char *file, int page);
void loadPageFromDisk(const char *file, int page);
void deletePageFromDisk(int page);
@@ -227,7 +227,7 @@ public:
bool _disableScreen;
const ScreenDim *_curDim;
-
+
static const ScreenDim _screenDimTable[];
static const int _screenDimTableCount;
@@ -298,19 +298,19 @@ protected:
int _animBlockSize;
int _mouseLockCount;
-
+
Rect *_bitBlitRects;
int _bitBlitNum;
uint8 *_unkPtr1, *_unkPtr2;
-
+
enum {
kMaxDirtyRects = 50
};
-
+
bool _forceFullUpdate;
int _numDirtyRects;
Rect *_dirtyRects;
-
+
void addDirtyRect(int x, int y, int w, int h);
OSystem *_system;
diff --git a/engines/kyra/screen_v1.h b/engines/kyra/screen_v1.h
index f6133db49d..5354e870fa 100644
--- a/engines/kyra/screen_v1.h
+++ b/engines/kyra/screen_v1.h
@@ -22,10 +22,10 @@
* $Id$
*
*/
-
+
#ifndef KYRA_SCREEN_V1_H
#define KYRA_SCREEN_V1_H
-
+
#include "kyra/screen.h"
namespace Kyra {
@@ -36,9 +36,9 @@ class Screen_v1 : public Screen {
public:
Screen_v1(KyraEngine_v1 *vm, OSystem *system);
virtual ~Screen_v1();
-
+
void fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime);
-
+
protected:
KyraEngine_v1 *_vm;
};
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index 6060ac0498..a3a415c1d7 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -125,7 +125,7 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
cdm.w <<= 3;
int na = 0, nb = 0, nc = w2;
-
+
if (!calcBounds(cdm.w, cdm.h, x2, y2, w2, h2, na, nb, nc))
return;
@@ -140,7 +140,7 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
u = t;
uint8 * s = src + (x1 + t) * 320;
uint8 * dt = (uint8*) _wsaFrameAnimBuffer;
-
+
t = w2 - w1;
if (!t) {
memcpy(dt, s, w2);
@@ -158,7 +158,7 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
cnt++;
}
memset(dt, *s++, cnt);
- dt += cnt;
+ dt += cnt;
}
}
} else {
@@ -181,7 +181,7 @@ void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2,
}
memcpy(dst + x2 + cdm.sx, _wsaFrameAnimBuffer + na, w2);
dst += 320;
- } while (++nb < h2);
+ } while (++nb < h2);
}
void Screen_v2::cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW,
@@ -212,7 +212,7 @@ void Screen_v2::cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int
uint8 * dst = getPagePtr(dstPage) + dstW * (Y2 + r2);
uint8 * cmp = getPagePtr(cmpPage);
- while (H2--) {
+ while (H2--) {
uint8 * s = src + r4 + X1;
uint8 * d = dst + r1 + X2;
@@ -230,7 +230,7 @@ bool Screen_v2::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, i
x2 = 0;
y2 = 0;
w2 = w1;
-
+
int t = x1 + w1;
if (t < 1) {
w1 = h1 = -1;
diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h
index 654ee6f99f..6931f5e4d4 100644
--- a/engines/kyra/screen_v2.h
+++ b/engines/kyra/screen_v2.h
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#ifndef KYRA_SCREEN_V2_H
#define KYRA_SCREEN_V2_H
@@ -37,10 +37,10 @@ friend class Debugger_v2;
public:
Screen_v2(KyraEngine_v2 *vm, OSystem *system);
virtual ~Screen_v2();
-
+
virtual void setScreenDim(int dim);
const ScreenDim *getScreenDim(int dim);
-
+
// sequence player
void generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag);
void applyGrayOverlay(int x, int y, int w, int h, int pageNum, const uint8 *grayOverlay);
@@ -50,30 +50,30 @@ public:
int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim);
void cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage,
int dstW, int dstH, int dstX, int dstY, int cmpW, int cmpH, int cmpPage);
-
+
// screen page handling
void copyWsaRect(int x, int y, int w, int h, int dimState, int plotFunc, const uint8 *src,
int unk1, const uint8 *unkPtr1, const uint8 *unkPtr2);
-
+
// shape handling
uint8 *getPtrToShape(uint8 *shpFile, int shape);
const uint8 *getPtrToShape(const uint8 *shpFile, int shape);
-
+
int getShapeScaledWidth(const uint8 *shpFile, int scale);
int getShapeScaledHeight(const uint8 *shpFile, int scale);
uint16 getShapeSize(const uint8 *shp);
-
+
uint8 *makeShapeCopy(const uint8 *src, int index);
-
+
void drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int sd, int flags, ...);
-
+
// rect handling
virtual int getRectSize(int w, int h);
-
+
// layer handling
int getLayer(int x, int y);
-
+
// mouse handling
bool isMouseVisible() const;
@@ -81,12 +81,12 @@ public:
void setTextColorMap(const uint8 *cmap);
private:
KyraEngine_v2 *_vm;
-
+
static const ScreenDim _screenDimTable[];
static const int _screenDimTableCount;
uint8 *_wsaFrameAnimBuffer;
-
+
// maybe subclass screen for kyra3
static const ScreenDim _screenDimTableK3[];
static const int _screenDimTableCountK3;
diff --git a/engines/kyra/script.h b/engines/kyra/script.h
index 244547b372..ce59d8ee29 100644
--- a/engines/kyra/script.h
+++ b/engines/kyra/script.h
@@ -64,12 +64,12 @@ struct ScriptState {
class ScriptFileParser {
public:
ScriptFileParser() : _scriptFile(), _startOffset(0), _endOffset(0) {}
- ScriptFileParser(const char *filename, Resource *res) : _scriptFile(), _startOffset(0), _endOffset(0) { setFile(filename, res); }
+ ScriptFileParser(const char *filename, Resource *res) : _scriptFile(), _startOffset(0), _endOffset(0) { setFile(filename, res); }
~ScriptFileParser() { destroy(); }
-
+
// 'script' must be allocated with new!
void setFile(const char *filename, Resource *res);
-
+
operator bool() const { return (_startOffset != _endOffset) && _scriptFile.isOpen(); }
uint32 getFORMBlockSize();
@@ -86,15 +86,15 @@ private:
class ScriptHelper {
public:
ScriptHelper(KyraEngine *vm);
-
+
bool loadScript(const char *filename, ScriptData *data, const Common::Array<const Opcode*> *opcodes);
void unloadScript(ScriptData *data);
-
+
void initScript(ScriptState *scriptState, const ScriptData *data);
bool startScript(ScriptState *script, int function);
-
+
bool validScript(ScriptState *script);
-
+
bool runScript(ScriptState *script);
protected:
KyraEngine *_vm;
@@ -106,7 +106,7 @@ protected:
CommandProc proc;
const char *desc;
};
-
+
const CommandEntry *_commands;
private:
void cmd_jmpTo(ScriptState*);
diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp
index 190177fcb1..9f3de9484a 100644
--- a/engines/kyra/script_v2.cpp
+++ b/engines/kyra/script_v2.cpp
@@ -110,7 +110,7 @@ int KyraEngine_v2::o2_setCharacterAnimFrame(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o2_setCharacterAnimFrame(%p) (-, %d, %d)", (const void *)script, stackPos(1), stackPos(2));
int animFrame = stackPos(1);
int updateAnim = stackPos(2);
-
+
_mainCharacter.animFrame = animFrame;
if (updateAnim)
updateCharacterAnim(0);
@@ -162,7 +162,7 @@ int KyraEngine_v2::o2_displayWsaFrame(ScriptState *script) {
int doUpdate = stackPos(6);
int dstPage = stackPos(7);
int backUp = stackPos(8);
-
+
_screen->hideMouse();
uint32 endTime = _system->getMillis() + waitTime * _tickLength;
_wsaSlots[slot]->setX(x);
@@ -170,18 +170,18 @@ int KyraEngine_v2::o2_displayWsaFrame(ScriptState *script) {
_wsaSlots[slot]->setDrawPage(dstPage);
_wsaSlots[slot]->displayFrame(frame, copyParam | 0xC000);
_screen->updateScreen();
-
+
if (backUp)
memcpy(_gamePlayBuffer, _screen->getCPagePtr(3), 46080);
while (_system->getMillis() < endTime) {
if (doUpdate)
update();
-
+
if (endTime - _system->getMillis() >= 10)
delay(10);
}
- _screen->showMouse();
+ _screen->showMouse();
return 0;
}
@@ -196,14 +196,14 @@ int KyraEngine_v2::o2_displayWsaSequentialFrames(ScriptState *script) {
int slot = stackPos(5);
int maxTimes = stackPos(6);
int copyFlags = stackPos(7);
-
+
if (maxTimes > 1)
maxTimes = 1;
-
+
_wsaSlots[slot]->setX(x);
_wsaSlots[slot]->setY(y);
_wsaSlots[slot]->setDrawPage(0);
-
+
_screen->hideMouse();
int curTime = 0;
while (curTime < maxTimes) {
@@ -212,7 +212,7 @@ int KyraEngine_v2::o2_displayWsaSequentialFrames(ScriptState *script) {
uint32 endTime = _system->getMillis() + waitTime * _tickLength;
_wsaSlots[slot]->displayFrame(i, 0xC000 | copyFlags);
_screen->updateScreen();
-
+
do {
update();
@@ -257,7 +257,7 @@ int KyraEngine_v2::o2_defineItem(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o2_defineItem(%p) (%d, %d, %d, %d)", (const void *)script,
stackPos(0), stackPos(1), stackPos(2), stackPos(3));
int freeItem = findFreeItem();
-
+
if (freeItem >= 0) {
_itemList[freeItem].id = stackPos(0);
_itemList[freeItem].x = stackPos(1);
@@ -280,7 +280,7 @@ int KyraEngine_v2::o2_countItemInInventory(ScriptState *script) {
if (_itemInHand == int16(item))
++count;
-
+
return count;
}
@@ -386,9 +386,9 @@ int KyraEngine_v2::o2_drawSceneShape(ScriptState *script) {
_screen->hideMouse();
restorePage3();
-
+
_screen->drawShape(2, _sceneShapeTable[shape], x, y, 2, flag);
-
+
memcpy(_gamePlayBuffer, _screen->getCPagePtr(3), 46080);
_screen->drawShape(0, _sceneShapeTable[shape], x, y, 2, flag);
@@ -442,7 +442,7 @@ int KyraEngine_v2::o2_update(ScriptState *script) {
update();
}
- return 0;
+ return 0;
}
int KyraEngine_v2::o2_fadeScenePal(ScriptState *script) {
@@ -461,7 +461,7 @@ int KyraEngine_v2::o2_enterNewSceneEx(ScriptState *script) {
runSceneScript4(0);
_unk5 = 1;
-
+
if (_mainCharX == -1 || _mainCharY == -1) {
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
updateCharacterAnim(0);
@@ -545,22 +545,22 @@ int KyraEngine_v2::o2_defineRoomEntrance(ScriptState *script) {
_sceneEnterX1 = stackPos(1);
_sceneEnterY1 = stackPos(2);
break;
-
+
case 1:
_sceneEnterX2 = stackPos(1);
_sceneEnterY2 = stackPos(2);
break;
-
+
case 2:
_sceneEnterX3 = stackPos(1);
_sceneEnterY3 = stackPos(2);
break;
-
+
case 3:
_sceneEnterX4 = stackPos(1);
_sceneEnterY4 = stackPos(2);
break;
-
+
default:
break;
}
@@ -601,17 +601,17 @@ int KyraEngine_v2::o2_defineSceneAnim(ScriptState *script) {
anim.shapeIndex = stackPos(11);
if (stackPosString(12) != 0)
strcpy(anim.filename, stackPosString(12));
-
+
if (anim.flags & 0x40) {
if (!_sceneAnimMovie[animId]->open(anim.filename, 1, 0))
error("couldn't load '%s'", anim.filename);
-
+
if (_sceneAnimMovie[animId]->xAdd() || _sceneAnimMovie[animId]->yAdd())
anim.wsaFlag = 1;
else
anim.wsaFlag = 0;
}
-
+
return 0;
}
@@ -633,7 +633,7 @@ int KyraEngine_v2::o2_defineRoom(ScriptState *script) {
scene->exit4 = stackPos(5);
scene->flags = stackPos(6);
scene->sound = stackPos(7);
-
+
if (_mainCharacter.sceneId == stackPos(0)) {
_sceneExit1 = scene->exit1;
_sceneExit2 = scene->exit2;
@@ -661,7 +661,7 @@ int KyraEngine_v2::o2_countItemInstances(ScriptState *script) {
if (_itemList[i].id == item)
++count;
}
-
+
if (_hiddenItems[0] == item && _newChapterFile == 1)
++count;
if (_hiddenItems[1] == item && _newChapterFile == 1)
diff --git a/engines/kyra/seqplayer.h b/engines/kyra/seqplayer.h
index 4636a956e9..ce7f4648df 100644
--- a/engines/kyra/seqplayer.h
+++ b/engines/kyra/seqplayer.h
@@ -43,7 +43,7 @@ public:
void freeHandShapes();
bool playSequence(const uint8 *seqData, bool skipSeq);
-
+
uint8 *setPanPages(int pageNum, int shape);
protected:
KyraEngine_v1 *_vm;
diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp
index 6b4516bbd8..785b0b3aed 100644
--- a/engines/kyra/sequences_v1.cpp
+++ b/engines/kyra/sequences_v1.cpp
@@ -59,7 +59,7 @@ void KyraEngine_v1::seq_demo() {
_screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 0);
_screen->updateScreen();
_screen->fadeFromBlack();
-
+
_seq->playSequence(_seq_WestwoodLogo, true);
delay(60 * _tickLength);
_seq->playSequence(_seq_KyrandiaLogo, true);
@@ -95,7 +95,7 @@ void KyraEngine_v1::seq_intro() {
if (_flags.isTalkie)
_res->loadPakFile("INTRO.VRM");
-
+
static const IntroProc introProcTable[] = {
&KyraEngine_v1::seq_introLogos,
&KyraEngine_v1::seq_introStory,
@@ -145,7 +145,7 @@ void KyraEngine_v1::seq_introLogos() {
}
_screen->clearPage(0);
-
+
if (_flags.platform == Common::kPlatformAmiga) {
_screen->loadPalette("INTRO.PAL", _screen->_currentPalette);
_screen->loadBitmap("BOTTOM.CPS", 3, 5, 0);
@@ -163,7 +163,7 @@ void KyraEngine_v1::seq_introLogos() {
_screen->_curPage = 0;
_screen->updateScreen();
_screen->fadeFromBlack();
-
+
if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || _quitFlag) {
_screen->fadeToBlack();
_screen->clearPage(0);
@@ -266,7 +266,7 @@ void KyraEngine_v1::seq_introStory() {
const int x2 = (Screen::SCREEN_W - _screen->getTextWidth(_seq_textsTable[19])) / 2;
const int y1 = 175;
const int y2 = 184;
-
+
uint8 colorMap[] = { 0, 15, 12, 12 };
_screen->setTextColor(colorMap, 0, 3);
@@ -327,26 +327,26 @@ void KyraEngine_v1::seq_createAmuletJewel(int jewel, int page, int noSound, int
_screen->updateScreen();
delayWithTicks(3);
}
-
+
const uint16 *opcodes = 0;
switch (jewel - 1) {
case 0:
opcodes = specialJewelTable1;
break;
-
+
case 1:
opcodes = specialJewelTable2;
break;
-
+
case 2:
opcodes = specialJewelTable3;
break;
-
+
case 3:
opcodes = specialJewelTable4;
break;
}
-
+
if (opcodes) {
for (int i = 0; opcodes[i] != 0xFFFF; ++i) {
_screen->drawShape(page, _shapes[opcodes[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0);
@@ -444,31 +444,31 @@ void KyraEngine_v1::seq_poisonDeathNowAnim() {
assert(_posionDeathShapeTable);
setupShapes123(_posionDeathShapeTable, 20, 0);
_animator->setBrandonAnimSeqSize(8, 48);
-
+
_currentCharacter->currentAnimFrame = 124;
_animator->animRefreshNPC(0);
delayWithTicks(30);
-
+
_currentCharacter->currentAnimFrame = 123;
_animator->animRefreshNPC(0);
delayWithTicks(30);
-
+
for (int i = 125; i <= 139; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
delayWithTicks(60);
-
+
for (int i = 140; i <= 142; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
delayWithTicks(60);
-
+
_animator->resetBrandonAnimSeqSize();
freeShapes123();
_animator->restoreAllObjectBackgrounds();
@@ -489,7 +489,7 @@ void KyraEngine_v1::seq_playFluteAnimation() {
_animator->animRefreshNPC(0);
delayWithTicks(2);
}
-
+
int delayTime = 0, soundType = 0;
if (queryGameFlag(0x85)) {
snd_playSoundEffect(0x63);
@@ -505,13 +505,13 @@ void KyraEngine_v1::seq_playFluteAnimation() {
delayTime = 2;
soundType = 2;
}
-
+
for (int i = 131; i <= 158; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(delayTime);
}
-
+
for (int i = 126; i >= 123; --i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
@@ -522,7 +522,7 @@ void KyraEngine_v1::seq_playFluteAnimation() {
_animator->animRefreshNPC(0);
freeShapes123();
_screen->showMouse();
-
+
if (soundType == 1) {
assert(_fluteString);
characterSays(1000, _fluteString[0], 0, -2);
@@ -541,13 +541,13 @@ void KyraEngine_v1::seq_winterScroll1() {
assert(_winterScroll2Table);
setupShapes123(_winterScrollTable, 7, 0);
_animator->setBrandonAnimSeqSize(5, 66);
-
+
for (int i = 123; i <= 129; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
freeShapes123();
snd_playSoundEffect(0x20);
@@ -565,7 +565,7 @@ void KyraEngine_v1::seq_winterScroll1() {
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
if (_currentCharacter->sceneId == 41 && !queryGameFlag(0xA2)) {
snd_playSoundEffect(0x20);
_sprites->_anims[0].play = false;
@@ -574,13 +574,13 @@ void KyraEngine_v1::seq_winterScroll1() {
_animator->sprites()[1].active = 1;
setGameFlag(0xA2);
}
-
+
for (int i = midpoint; i < 123 + numFrames; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
if (_currentCharacter->sceneId == 117 && !queryGameFlag(0xB3)) {
for (int i = 0; i <= 7; ++i) {
_sprites->_anims[i].play = false;
@@ -596,16 +596,16 @@ void KyraEngine_v1::seq_winterScroll1() {
} else {
delayWithTicks(120);
}
-
+
freeShapes123();
setupShapes123(_winterScroll2Table, 4, 0);
-
+
for (int i = 123; i <= 126; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
_animator->resetBrandonAnimSeqSize();
_currentCharacter->currentAnimFrame = 7;
_animator->animRefreshNPC(0);
@@ -614,27 +614,27 @@ void KyraEngine_v1::seq_winterScroll1() {
}
void KyraEngine_v1::seq_winterScroll2() {
- debugC(9, kDebugLevelMain, "seq_winterScroll2()");
+ debugC(9, kDebugLevelMain, "seq_winterScroll2()");
_screen->hideMouse();
checkAmuletAnimFlags();
assert(_winterScrollTable);
setupShapes123(_winterScrollTable, 7, 0);
_animator->setBrandonAnimSeqSize(5, 66);
-
+
for (int i = 123; i <= 128; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
delayWithTicks(120);
-
+
for (int i = 127; i >= 123; --i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
_animator->resetBrandonAnimSeqSize();
_currentCharacter->currentAnimFrame = 7;
_animator->animRefreshNPC(0);
@@ -651,7 +651,7 @@ void KyraEngine_v1::seq_makeBrandonInv() {
if (_beadStateVar == 4 || _beadStateVar == 6)
return;
}
-
+
_screen->hideMouse();
checkAmuletAnimFlags();
_brandonStatusBit |= 0x20;
@@ -714,11 +714,11 @@ void KyraEngine_v1::seq_makeBrandonWisp() {
debugC(9, kDebugLevelMain, "seq_makeBrandonWisp()");
if (_deathHandler == 8)
return;
-
+
if (_currentCharacter->sceneId == 210) {
if (_beadStateVar == 4 || _beadStateVar == 6)
return;
- }
+ }
_screen->hideMouse();
checkAmuletAnimFlags();
assert(_brandonToWispTable);
@@ -779,9 +779,9 @@ void KyraEngine_v1::seq_dispelMagicAnimation() {
_animator->animRefreshNPC(0);
delayWithTicks(8);
}
-
+
delayWithTicks(120);
-
+
for (int i = 127; i >= 123; --i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
@@ -799,7 +799,7 @@ void KyraEngine_v1::seq_fillFlaskWithWater(int item, int type) {
int newItem = -1;
static const uint8 flaskTable1[] = { 0x46, 0x48, 0x4A, 0x4C };
static const uint8 flaskTable2[] = { 0x47, 0x49, 0x4B, 0x4D };
-
+
if (item >= 60 && item <= 77) {
assert(_flaskFull);
characterSays(8006, _flaskFull[0], 0, -2);
@@ -810,10 +810,10 @@ void KyraEngine_v1::seq_fillFlaskWithWater(int item, int type) {
assert(type >= 0 && type < ARRAYSIZE(flaskTable2));
newItem = flaskTable2[type];
}
-
+
if (newItem == -1)
return;
-
+
_screen->hideMouse();
setMouseItem(newItem);
_screen->showMouse();
@@ -830,7 +830,7 @@ void KyraEngine_v1::seq_fillFlaskWithWater(int item, int type) {
void KyraEngine_v1::seq_playDrinkPotionAnim(int item, int unk2, int flags) {
debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_playDrinkPotionAnim(%d, %d, %d)", item, unk2, flags);
uint8 red, green, blue;
-
+
switch (item) {
case 60:
case 61:
@@ -875,9 +875,9 @@ void KyraEngine_v1::seq_playDrinkPotionAnim(int item, int unk2, int flags) {
red = (uint8)((double)red * 0.63);
green = (uint8)((double)green * 0.63);
blue = (uint8)((double)blue * 0.63);
-
+
_screen->setPaletteIndex(0xFE, red, green, blue);
-
+
_screen->hideMouse();
checkAmuletAnimFlags();
_currentCharacter->facing = 5;
@@ -885,12 +885,12 @@ void KyraEngine_v1::seq_playDrinkPotionAnim(int item, int unk2, int flags) {
assert(_drinkAnimationTable);
setupShapes123(_drinkAnimationTable, 9, flags);
_animator->setBrandonAnimSeqSize(5, 54);
-
+
for (int i = 123; i <= 131; ++i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(5);
- }
+ }
snd_playSoundEffect(0x34);
for (int i = 0; i < 2; ++i) {
_currentCharacter->currentAnimFrame = 130;
@@ -900,18 +900,18 @@ void KyraEngine_v1::seq_playDrinkPotionAnim(int item, int unk2, int flags) {
_animator->animRefreshNPC(0);
delayWithTicks(7);
}
-
+
if (unk2) {
// XXX
}
-
+
for (int i = 131; i >= 123; --i) {
_currentCharacter->currentAnimFrame = i;
_animator->animRefreshNPC(0);
delayWithTicks(5);
}
-
- _animator->resetBrandonAnimSeqSize();
+
+ _animator->resetBrandonAnimSeqSize();
_currentCharacter->currentAnimFrame = 7;
_animator->animRefreshNPC(0);
freeShapes123();
@@ -947,7 +947,7 @@ int KyraEngine_v1::seq_playEnd() {
_unkEndSeqVar2 = _system->getMillis() + 600 * _tickLength;
_screen->copyRegion(312, 0, 312, 0, 8, 136, 0, 2);
}
-
+
// TODO: better handling. This timer shouldn't count when the menu is open or something.
if (_unkEndSeqVar2 != -1) {
if (_system->getMillis() > (uint32)_unkEndSeqVar2) {
@@ -956,7 +956,7 @@ int KyraEngine_v1::seq_playEnd() {
_malcolmFlag = 1;
}
}
-
+
if (handleMalcolmFlag()) {
_beadStateVar = 0;
_malcolmFlag = 12;
@@ -1057,7 +1057,7 @@ void KyraEngine_v1::seq_playCredits() {
static const uint8 colorMap[] = { 0, 0, 0xC, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
static const char stringTerms[] = { 0x5, 0xd, 0x0};
static const int numStrings = 250;
-
+
struct {
int16 x, y;
uint8 code;
@@ -1065,18 +1065,18 @@ void KyraEngine_v1::seq_playCredits() {
Screen::FontId font;
uint8 *str;
} strings[numStrings];
-
+
memset(strings, 0, sizeof(strings));
-
+
_screen->hideMouse();
if (!_flags.isTalkie) {
_screen->loadFont(Screen::FID_CRED6_FNT, "CREDIT6.FNT");
_screen->loadFont(Screen::FID_CRED8_FNT, "CREDIT8.FNT");
} else
_screen->setFont(Screen::FID_8_FNT);
-
+
_screen->loadBitmap("CHALET.CPS", 4, 4, _screen->_currentPalette);
-
+
_screen->setCurPage(0);
_screen->clearCurPage();
_screen->setTextColorMap(colorMap);
@@ -1088,7 +1088,7 @@ void KyraEngine_v1::seq_playCredits() {
uint8 *buffer = 0;
uint32 size = 0;
-
+
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) {
int sizeTmp = 0;
const uint8 *bufferTmp = _staticres->loadRawData(kCreditsStrings, sizeTmp);
@@ -1105,26 +1105,26 @@ void KyraEngine_v1::seq_playCredits() {
uint8 *nextString = buffer;
uint8 *currentString = buffer;
int currentY = 200;
-
+
for (int i = 0; i < numStrings; i++) {
if (*nextString == 0)
break;
-
+
currentString = nextString;
nextString = (uint8 *)strpbrk((const char *)currentString, stringTerms);
if (!nextString)
nextString = (uint8 *)strchr((const char *)currentString, 0);
-
+
strings[i].code = nextString[0];
*nextString = 0;
if (strings[i].code != 0)
nextString++;
-
+
if (*currentString == 3 || *currentString == 4) {
strings[i].unk1 = *currentString;
currentString++;
}
-
+
if (*currentString == 1) {
currentString++;
if (!_flags.isTalkie)
@@ -1137,28 +1137,28 @@ void KyraEngine_v1::seq_playCredits() {
}
strings[i].font = _screen->_currentFont;
- if (strings[i].unk1 == 3)
+ if (strings[i].unk1 == 3)
strings[i].x = 157 - _screen->getTextWidth((const char *)currentString);
else if (strings[i].unk1 == 4)
strings[i].x = 161;
else
strings[i].x = (320 - _screen->getTextWidth((const char *)currentString)) / 2 + 1;
-
+
strings[i].y = currentY;
if (strings[i].code != 5)
currentY += 10;
-
+
strings[i].str = currentString;
}
_screen->setCurPage(2);
-
+
memset(_screen->getPalette(2), 0, sizeof(uint8)*768);
_screen->setScreenPalette(_screen->getPalette(2));
_screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 0, Screen::CR_NO_P_CHECK);
_screen->fadePalette(_screen->_currentPalette, 0x5A);
- Common::Event event;
+ Common::Event event;
bool finished = false;
int bottom = 201;
while (!finished) {
@@ -1166,7 +1166,7 @@ void KyraEngine_v1::seq_playCredits() {
if (bottom > 175) {
_screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 2, Screen::CR_NO_P_CHECK);
bottom = 0;
-
+
for (int i = 0; i < numStrings; i++) {
if (strings[i].y < 200 && strings[i].y > 0) {
if (strings[i].font != _screen->_currentFont)
@@ -1203,7 +1203,7 @@ void KyraEngine_v1::seq_playCredits() {
}
delete [] buffer;
-
+
_screen->fadeToBlack();
_screen->clearCurPage();
_screen->showMouse();
@@ -1219,7 +1219,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
static uint16 frame = 0;
static uint32 timer1 = 0;
static uint32 timer2 = 0;
-
+
switch (_malcolmFlag) {
case 1:
frame = 0;
@@ -1243,7 +1243,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
}
}
break;
-
+
case 3:
if (_system->getMillis() < timer1) {
if (_system->getMillis() >= timer2) {
@@ -1260,7 +1260,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
frame = 18;
}
break;
-
+
case 4:
if (_system->getMillis() >= timer2) {
_finalA->setX(8);
@@ -1277,7 +1277,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
}
}
break;
-
+
case 5:
if (_system->getMillis() >= timer2) {
_finalA->setX(8);
@@ -1293,7 +1293,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
}
}
break;
-
+
case 6:
if (_unkEndSeqVar4) {
if (frame <= 33 && _system->getMillis() >= timer2) {
@@ -1312,7 +1312,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
}
}
break;
-
+
case 7:
if (_unkEndSeqVar5 == 1) {
_malcolmFlag = 8;
@@ -1339,7 +1339,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
}
}
break;
-
+
case 9:
snd_playSoundEffect(12);
snd_playSoundEffect(12);
@@ -1356,7 +1356,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
delay(60 * _tickLength);
_malcolmFlag = 0;
return 1;
-
+
case 10:
if (!_beadStateVar) {
handleBeadState();
@@ -1367,7 +1367,7 @@ int KyraEngine_v1::handleMalcolmFlag() {
_malcolmFlag = 11;
}
break;
-
+
case 11:
if (_system->getMillis() >= timer2) {
_text->restoreTalkTextMessageBkgd(2, 0);
@@ -1375,11 +1375,11 @@ int KyraEngine_v1::handleMalcolmFlag() {
timer1 = _system->getMillis() + 180 * _tickLength;
}
break;
-
+
default:
break;
}
-
+
return 0;
}
@@ -1389,7 +1389,7 @@ int KyraEngine_v1::handleBeadState() {
static uint32 timer2 = 0;
static BeadState beadState1 = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
static BeadState beadState2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
+
static const int table1[] = {
-1, -2, -4, -5, -6, -7, -6, -5,
-4, -2, -1, 0, 1, 2, 4, 5,
@@ -1403,21 +1403,21 @@ int KyraEngine_v1::handleBeadState() {
0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0
};
-
+
switch (_beadStateVar) {
case 0:
if (beadState1.x != -1 && _endSequenceBackUpRect) {
_screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect);
_screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height);
}
-
+
beadState1.x = -1;
beadState1.tableIndex = 0;
timer1 = 0;
timer2 = 0;
_lastDisplayedPanPage = 0;
return 1;
-
+
case 1:
if (beadState1.x != -1) {
if (_endSequenceBackUpRect) {
@@ -1429,7 +1429,7 @@ int KyraEngine_v1::handleBeadState() {
}
_beadStateVar = 2;
break;
-
+
case 2:
if (_system->getMillis() >= timer1) {
int x = 0, y = 0;
@@ -1472,7 +1472,7 @@ int KyraEngine_v1::handleBeadState() {
_screen->addBitBlitRect(x, y, beadState1.width2, beadState1.height);
}
break;
-
+
case 3:
if (_system->getMillis() >= timer1) {
timer1 = _system->getMillis() + 4 * _tickLength;
@@ -1505,7 +1505,7 @@ int KyraEngine_v1::handleBeadState() {
beadState1.unk8 = _currentCharacter->x1 - 4;
beadState1.unk9 = _currentCharacter->y1 - 30;
}
-
+
if (_text->printed())
_text->restoreTalkTextMessageBkgd(2, 0);
@@ -1514,7 +1514,7 @@ int KyraEngine_v1::handleBeadState() {
}
}
break;
-
+
case 4:
if (_system->getMillis() >= timer1) {
int x = 0, y = 0;
@@ -1543,7 +1543,7 @@ int KyraEngine_v1::handleBeadState() {
}
}
break;
-
+
case 5:
if (_system->getMillis() >= timer1) {
timer1 = _system->getMillis() + _tickLength;
@@ -1590,13 +1590,13 @@ int KyraEngine_v1::handleBeadState() {
}
}
break;
-
+
case 6:
_screen->drawShape(2, _panPagesTable[19], beadState1.x, beadState1.y, 0, 0);
_screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height);
_beadStateVar = 0;
break;
-
+
default:
break;
}
@@ -1615,18 +1615,18 @@ void KyraEngine_v1::initBeadState(int x, int y, int x2, int y2, int unk, BeadSta
unk1 = 0;
else
unk1 = -1;
-
-
+
+
if (yDiff > 0)
unk2 = 1;
else if (yDiff == 0)
unk2 = 0;
else
unk2 = -1;
-
+
xDiff = ABS(xDiff);
yDiff = ABS(yDiff);
-
+
ptr->y = 0;
ptr->x = 0;
ptr->width = xDiff;
@@ -1641,7 +1641,7 @@ int KyraEngine_v1::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) {
debugC(9, kDebugLevelMain, "KyraEngine_v1::processBead(%d, %d, %p, %p, %p)", x, y, (const void *)&x2, (const void *)&y2, (const void *)ptr);
if (x == ptr->dstX && y == ptr->dstY)
return 1;
-
+
int xPos = x, yPos = y;
if (ptr->width >= ptr->height) {
for (int i = 0; i < ptr->unk9; ++i) {
@@ -1662,7 +1662,7 @@ int KyraEngine_v1::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) {
yPos += ptr->unk8;
}
}
-
+
int temp = ABS(x - ptr->dstX);
if (ptr->unk9 > temp)
xPos = ptr->dstX;
@@ -1685,7 +1685,7 @@ void KyraEngine_v1::setupPanPages() {
delete [] _panPagesTable[19];
_panPagesTable[19] = _screen->encodeShape(0, 0, 16, 9, 0);
assert(_panPagesTable[19]);
-
+
int curX = 16;
for (int i = 0; i < 19; ++i) {
delete [] _panPagesTable[i];
@@ -1734,10 +1734,10 @@ void KyraEngine_v1::updateKyragemFading() {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-
+
if (_system->getMillis() < _kyragemFadingState.timerCount)
return;
-
+
_kyragemFadingState.timerCount = _system->getMillis() + 4 * _tickLength;
int palPos = 684;
for (int i = 0; i < 20; ++i) {
@@ -1768,32 +1768,32 @@ void KyraEngine_v1::updateKyragemFading() {
return;
_kyragemFadingState.nextOperation = 3;
break;
-
+
case 3:
++_kyragemFadingState.bOffset;
if (_kyragemFadingState.bOffset < 19)
return;
_kyragemFadingState.nextOperation = 4;
break;
-
+
case 4:
--_kyragemFadingState.rOffset;
if (_kyragemFadingState.rOffset >= 1)
return;
_kyragemFadingState.nextOperation = 5;
break;
-
+
case 5:
++_kyragemFadingState.gOffset;
if (_kyragemFadingState.gOffset < 19)
return;
_kyragemFadingState.nextOperation = 0;
break;
-
+
default:
break;
}
-
+
_kyragemFadingState.timerCount = _system->getMillis() + 120 * _tickLength;
}
@@ -1854,7 +1854,7 @@ void KyraEngine_v1::drawJewelsFadeOutEnd(int jewel) {
else
newDelay = 8100;
break;
-
+
default:
newDelay = 3600;
break;
diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp
index 5b4a7ababd..0de8522736 100644
--- a/engines/kyra/sequences_v2.cpp
+++ b/engines/kyra/sequences_v2.cpp
@@ -750,7 +750,7 @@ int KyraEngine_v2::seq_introForest(WSAMovieV2 *wsaObj, int x, int y, int frm) {
seq_waitForTextsTimeout();
} else if (frm == 12) {
//if (_flags.lang == Common::FR_FRA)
- //XXX
+ //XXX
seq_playTalkText(2);
}
return frm;
@@ -874,7 +874,7 @@ int KyraEngine_v2::seq_finaleFunters(WSAMovieV2 *wsaObj, int x, int y, int frm)
chatFirstFrame = 0;
chatLastFrame = 8;
voiceIndex = 35;
- } else {
+ } else {
chatFirstFrame = 9;
chatLastFrame = 15;
}
@@ -963,7 +963,7 @@ int KyraEngine_v2::seq_finaleFerb(WSAMovieV2 *wsaObj, int x, int y, int frm) {
chatX = 60;
if (_flags.isTalkie)
- voiceIndex = 36;
+ voiceIndex = 36;
seq_playWsaSyncDialogue(25, voiceIndex, 143, chatX, chatY, chatW, wsaObj, 16, 25, x, y);
_seqFrameDelay = 16;
@@ -1186,7 +1186,7 @@ int KyraEngine_v2::seq_finaleFarmer(WSAMovieV2 *wsaObj, int x, int y, int frm) {
chatX = 90;
chatY = 30;
chatW = 100;
-
+
if (_flags.isTalkie) {
if (_flags.lang == Common::FR_FRA || _flags.lang == Common::DE_DEU) {
chatX = 75;
@@ -1363,7 +1363,7 @@ int KyraEngine_v2::seq_finaleFirates(WSAMovieV2 *wsaObj, int x, int y, int frm)
if (_flags.isTalkie)
voiceIndex = 43;
-
+
seq_playWsaSyncDialogue(32, voiceIndex, 137, chatX, chatY, chatW, wsaObj, 14, 16, x, y);
break;
@@ -1376,7 +1376,7 @@ int KyraEngine_v2::seq_finaleFirates(WSAMovieV2 *wsaObj, int x, int y, int frm)
break;
case 31:
- if (_flags.isTalkie)
+ if (_flags.isTalkie)
voiceIndex = 44;
chatX = 90;
diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp
index 4a62671df3..c2ec98c904 100644
--- a/engines/kyra/sound.cpp
+++ b/engines/kyra/sound.cpp
@@ -468,7 +468,7 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) {
//if (!_disableSound) {
// XXX
//}
-
+
if (_flags.platform == Common::kPlatformPC) {
assert(command*2+1 < _trackMapSize);
if (_curMusicTheme != _trackMap[command*2]) {
@@ -494,7 +494,7 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) {
_sound->playTrack(command);
}
}
- }
+ }
_lastMusicCommand = command;
}
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index 8b31cf4684..89ebe50d02 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -38,12 +38,12 @@ class AUDStream : public Audio::AudioStream {
public:
AUDStream(Common::File *file, bool loop = false);
~AUDStream();
-
+
int readBuffer(int16 *buffer, const int numSamples);
bool isStereo() const { return false; }
bool endOfData() const { return _endOfData; }
-
+
int getRate() const { return _rate; }
void beginFadeIn();
@@ -56,22 +56,22 @@ private:
int _rate;
uint _processedSize;
uint _totalSize;
-
+
int _bytesLeft;
-
+
byte *_outBuffer;
int _outBufferOffset;
uint _outBufferSize;
-
+
byte *_inBuffer;
uint _inBufferSize;
int32 _fadeSamples;
int32 _fadeCount;
int _fading;
-
+
int readChunk(int16 *buffer, const int maxSamples);
-
+
static const int8 WSTable2Bit[];
static const int8 WSTable4Bit[];
};
@@ -85,7 +85,7 @@ const int8 AUDStream::WSTable4Bit[] = {
AUDStream::AUDStream(Common::File *file, bool loop) : _file(file), _endOfData(true), _rate(0),
_processedSize(0), _totalSize(0), _bytesLeft(0), _outBuffer(0),
_outBufferOffset(0), _outBufferSize(0), _inBuffer(0), _inBufferSize(0) {
-
+
_rate = _file->readUint16LE();
_totalSize = _file->readUint32LE();
_loop = loop;
@@ -101,7 +101,7 @@ AUDStream::AUDStream(Common::File *file, bool loop) : _file(file), _endOfData(tr
int type = _file->readByte(); // type
_loopStart = file->pos();
-
+
if (type == 1 && !flags) {
_endOfData = false;
} else
@@ -128,7 +128,7 @@ void AUDStream::beginFadeOut() {
int AUDStream::readBuffer(int16 *buffer, const int numSamples) {
int samplesRead = 0, samplesLeft = numSamples;
-
+
while (samplesLeft > 0 && !_endOfData) {
int samples = readChunk(buffer, samplesLeft);
samplesRead += samples;
@@ -165,11 +165,11 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
uint16 size = _file->readUint16LE();
uint16 outSize = _file->readUint16LE();
uint32 id = _file->readUint32LE();
-
+
assert(id == 0x0000DEAF);
-
+
_processedSize += 8 + size;
-
+
_outBufferOffset = 0;
if (size == outSize) {
if (outSize > _outBufferSize) {
@@ -180,37 +180,37 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
}
_bytesLeft = size;
-
+
_file->read(_outBuffer, _bytesLeft);
} else {
_bytesLeft = outSize;
-
+
if (outSize > _outBufferSize) {
_outBufferSize = outSize;
delete [] _outBuffer;
_outBuffer = new uint8[_outBufferSize];
assert(_outBuffer);
}
-
+
if (size > _inBufferSize) {
_inBufferSize = size;
delete [] _inBuffer;
_inBuffer = new uint8[_inBufferSize];
assert(_inBuffer);
}
-
+
if (_file->read(_inBuffer, size) != size) {
_endOfData = true;
return 0;
}
-
+
int16 curSample = 0x80;
byte code = 0;
int8 count = 0;
uint16 input = 0;
int j = 0;
int i = 0;
-
+
while (outSize > 0) {
input = _inBuffer[i++] << 2;
code = (input >> 8) & 0xff;
@@ -279,7 +279,7 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) {
}
}
}
-
+
// copies the chunk data to the output buffer
if (_bytesLeft > 0) {
int samples = MIN(_bytesLeft, maxSamples);
@@ -340,14 +340,14 @@ int SoundDigital::playSound(Common::File *fileHandle, bool loop, bool fadeIn, in
break;
}
}
-
+
if (!use) {
warning("no free sound channel");
delete fileHandle;
return -1;
}
}
-
+
use->stream = new AUDStream(fileHandle, loop);
if (use->stream->endOfData()) {
delete use->stream;
@@ -358,10 +358,10 @@ int SoundDigital::playSound(Common::File *fileHandle, bool loop, bool fadeIn, in
if (fadeIn)
use->stream->beginFadeIn();
-
+
// TODO: set correct sound type from channel id
_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &use->handle, use->stream);
-
+
return use - _sounds;
}
diff --git a/engines/kyra/sound_v1.cpp b/engines/kyra/sound_v1.cpp
index ff345cf598..6c6d086882 100644
--- a/engines/kyra/sound_v1.cpp
+++ b/engines/kyra/sound_v1.cpp
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#include "kyra/sound.h"
#include "kyra/kyra_v1.h"
diff --git a/engines/kyra/sprites.h b/engines/kyra/sprites.h
index 255d878635..3304458fda 100644
--- a/engines/kyra/sprites.h
+++ b/engines/kyra/sprites.h
@@ -74,12 +74,12 @@ public:
void setupSceneAnims();
void loadDat(const char *filename, SceneExits &exits);
void loadSceneShapes();
-
+
Anim _anims[MAX_NUM_ANIMS];
uint8 *_sceneShapes[50];
void refreshSceneAnimObject(uint8 animNum, uint8 shapeNum, uint16 x, uint16 y, bool flipX, bool unkFlag);
-
+
int getDrawLayer(int y);
int _sceneAnimatorBeaconFlag;
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index ea73882d43..df5af4ab3e 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -233,14 +233,14 @@ bool StaticResource::init() {
{ k2SeqplayTlkFiles, kLanguageList, "S_TLKFILES." },
{ k2SeqplaySeqData, kRawData, "S_DATA.SEQ" },
{ k2SeqplayIntroTracks, kStringList, "S_INTRO.TRA" },
- { k2SeqplayFinaleTracks, kStringList, "S_FINALE.TRA" },
+ { k2SeqplayFinaleTracks, kStringList, "S_FINALE.TRA" },
{ k2SeqplayIntroCDA, kRawData, "S_INTRO.CDA" },
{ k2SeqplayFinaleCDA, kRawData, "S_FINALE.CDA" },
// Ingame
{ k2IngamePakFiles, kStringList, "I_PAKFILES.TXT" },
{ k2IngameSfxFiles, kStringList, "I_SFXFILES.TXT" },
- { k2IngameSfxIndex, kRawData, "I_SFXINDEX.TRA" },
+ { k2IngameSfxIndex, kRawData, "I_SFXINDEX.TRA" },
{ k2IngameTracks, kStringList, "I_TRACKS.TRA" },
{ k2IngameCDA, kRawData, "I_TRACKS.CDA" },
@@ -947,7 +947,7 @@ void KyraEngine_v2::initStaticResource() {
}
tlkfiles = 0;
_staticres->unloadId(k2SeqplayTlkFiles);
-
+
// assign music data
static const char *fmtMusicFileListIntro[] = { "intro" };
static const char *fmtMusicFileListFinale[] = { "finale" };
@@ -968,7 +968,7 @@ void KyraEngine_v2::initStaticResource() {
// setup sequence data
const uint8 *seqData = _staticres->loadRawData(k2SeqplaySeqData, tmp);
-
+
static const Seqproc hofSequenceCallbacks[] = { 0,
&KyraEngine_v2::seq_introWestwood,
&KyraEngine_v2::seq_introTitle, &KyraEngine_v2::seq_introOverview,
diff --git a/engines/kyra/text.h b/engines/kyra/text.h
index 594082187b..07bc0605dd 100644
--- a/engines/kyra/text.h
+++ b/engines/kyra/text.h
@@ -59,7 +59,7 @@ public:
virtual void restoreTalkTextMessageBkgd(int srcPage, int dstPage);
void printTalkTextMessage(const char *text, int x, int y, uint8 color, int srcPage, int dstPage);
void printIntroTextMessage(const char *text, int x, int y, uint8 col1, uint8 col2, uint8 col3,
- int dstPage, Screen::FontId font=Screen::FID_8_FNT);
+ int dstPage, Screen::FontId font=Screen::FID_8_FNT);
void printText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2, Screen::FontId font=Screen::FID_8_FNT);
void printCharacterText(const char *text, int8 charNum, int charX);
diff --git a/engines/kyra/text_v1.cpp b/engines/kyra/text_v1.cpp
index 4262ac5cb8..7f49c04766 100644
--- a/engines/kyra/text_v1.cpp
+++ b/engines/kyra/text_v1.cpp
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#include "kyra/kyra_v1.h"
#include "kyra/screen_v1.h"
#include "kyra/text.h"
@@ -33,7 +33,7 @@
namespace Kyra {
void KyraEngine_v1::waitForChatToFinish(int vocFile, int16 chatDuration, const char *chatStr, uint8 charNum) {
- debugC(9, kDebugLevelMain, "KyraEngine_v1::waitForChatToFinish(%i, %s, %i)", chatDuration, chatStr, charNum);
+ debugC(9, kDebugLevelMain, "KyraEngine_v1::waitForChatToFinish(%i, %s, %i)", chatDuration, chatStr, charNum);
bool hasUpdatedNPCs = false;
bool runLoop = true;
bool drawText = textEnabled();
@@ -113,8 +113,8 @@ void KyraEngine_v1::waitForChatToFinish(int vocFile, int16 chatDuration, const c
if ((chatDuration < (int16)(_system->getMillis() - timeAtStart)) && chatDuration != -1 && (!drawText || !snd_voiceIsPlaying()))
break;
- uint32 nextTime = loopStart + _tickLength;
-
+ uint32 nextTime = loopStart + _tickLength;
+
while (_system->getMillis() < nextTime) {
while (_eventMan->pollEvent(event)) {
switch (event.type) {
@@ -133,7 +133,7 @@ void KyraEngine_v1::waitForChatToFinish(int vocFile, int16 chatDuration, const c
break;
}
}
-
+
if (nextTime - _system->getMillis() >= 10) {
_system->delayMillis(10);
_system->updateScreen();
@@ -189,7 +189,7 @@ void KyraEngine_v1::restoreChatPartnerAnimFrame(int8 charNum) {
void KyraEngine_v1::backupChatPartnerAnimFrame(int8 charNum) {
_talkingCharNum = 0;
- if (charNum < 5 && charNum > 0)
+ if (charNum < 5 && charNum > 0)
_currentChatPartnerBackupFrame = _characterList[charNum].currentAnimFrame;
if (_currentCharacter->currentAnimFrame != 88) {
@@ -230,7 +230,7 @@ int KyraEngine_v1::initCharacterChat(int8 charNum) {
if (_talkingCharNum == -1) {
returnValue = 1;
_talkingCharNum = 0;
-
+
if (_currentCharacter->currentAnimFrame != 88) {
_currentCharacter->currentAnimFrame = 16;
if (_scaleMode != 0)
@@ -269,7 +269,7 @@ void KyraEngine_v1::characterSays(int vocFile, const char *chatStr, int8 charNum
if (_currentCharacter->sceneId == 210)
return;
- convoInitialized = initCharacterChat(charNum);
+ convoInitialized = initCharacterChat(charNum);
chatPartnerNum = getChatPartnerNum();
if (chatPartnerNum >= 0 && chatPartnerNum < 5)
@@ -298,7 +298,7 @@ void KyraEngine_v1::characterSays(int vocFile, const char *chatStr, int8 charNum
_text->_talkMessageY = yPos;
_text->_talkMessageH = lineNum * 10;
-
+
if (textEnabled()) {
_animator->restoreAllObjectBackgrounds();
@@ -347,7 +347,7 @@ void KyraEngine_v1::drawSentenceCommand(const char *sentence, int color) {
_currSentenceColor[0] = _screen->_currentPalette[765] = _screen->_currentPalette[color*3];
_currSentenceColor[1] = _screen->_currentPalette[766] = _screen->_currentPalette[color*3+1];
_currSentenceColor[2] = _screen->_currentPalette[767] = _screen->_currentPalette[color*3+2];
-
+
_screen->setScreenPalette(_screen->_currentPalette);
_startSentencePalIndex = 0;
}
@@ -373,7 +373,7 @@ void KyraEngine_v1::updateTextFade() {
debugC(9, kDebugLevelMain, "KyraEngine_v1::updateTextFade()");
if (!_fadeText)
return;
-
+
bool finished = false;
for (int i = 0; i < 3; i++) {
if (_currSentenceColor[i] > 4)
@@ -384,7 +384,7 @@ void KyraEngine_v1::updateTextFade() {
finished = true;
}
}
-
+
_screen->_currentPalette[765] = _currSentenceColor[0];
_screen->_currentPalette[766] = _currSentenceColor[1];
_screen->_currentPalette[767] = _currSentenceColor[2];
diff --git a/engines/kyra/text_v2.cpp b/engines/kyra/text_v2.cpp
index 24e146a990..345af34e71 100644
--- a/engines/kyra/text_v2.cpp
+++ b/engines/kyra/text_v2.cpp
@@ -95,7 +95,7 @@ void TextDisplayer_v2::calcWidestLineBounds(int &x1, int &x2, int w, int x) {
x1 = x;
x1 -= (w >> 1);
x2 = x1 + w + 1;
-
+
if (x1 + w >= 311)
x1 = 311 - w - 1;
@@ -113,13 +113,13 @@ int KyraEngine_v2::chatGetType(const char *str) {
switch (*str) {
case '!':
return 2;
-
+
case ')':
return -1;
-
+
case '?':
return 1;
-
+
default:
return 0;
}
@@ -133,7 +133,7 @@ void KyraEngine_v2::objectChat(const char *str, int object, int vocHigh, int voc
setNextIdleAnimTimer();
_chatVocHigh = _chatVocLow = -1;
-
+
objectChatInit(str, object, vocHigh, vocLow);
_chatText = str;
_chatObject = object;
@@ -175,7 +175,7 @@ void KyraEngine_v2::objectChat(const char *str, int object, int vocHigh, int voc
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
updateCharacterAnim(0);
-
+
_chatText = 0;
_chatObject = -1;
@@ -187,7 +187,7 @@ void KyraEngine_v2::objectChatInit(const char *str, int object, int vocHigh, int
int lineNum = _text->buildMessageSubstrings(str);
int yPos = 0, xPos = 0;
-
+
if (!object) {
int scale = getScale(_mainCharacter.x1, _mainCharacter.y1);
yPos = _mainCharacter.y1 - ((_mainCharacter.height * scale) >> 8) - 8;
@@ -225,7 +225,7 @@ void KyraEngine_v2::objectChatInit(const char *str, int object, int vocHigh, int
} else {
_chatVocHigh = _chatVocLow = -1;
}
-
+
_screen->showMouse();
}
@@ -335,19 +335,19 @@ void KyraEngine_v2::objectChatWaitToFinish() {
void KyraEngine_v2::initTalkObject(int initObject) {
TalkObject &object = _talkObjectList[initObject];
-
+
char STAFilename[13];
char TLKFilename[13];
char ENDFilename[13];
-
+
strcpy(STAFilename, object.filename);
strcpy(TLKFilename, object.filename);
strcpy(ENDFilename, object.filename);
-
+
strcpy(STAFilename + 4, "_STA.TIM");
strcpy(TLKFilename + 4, "_TLK.TIM");
strcpy(ENDFilename + 4, "_END.TIM");
-
+
_currentTalkSections.STATim = loadTIMFile(STAFilename, NULL, 0);
_currentTalkSections.TLKTim = loadTIMFile(TLKFilename, NULL, 0);
_currentTalkSections.ENDTim = loadTIMFile(ENDFilename, NULL, 0);
@@ -356,7 +356,7 @@ void KyraEngine_v2::initTalkObject(int initObject) {
_specialSceneScriptStateBackup[object.scriptId] = _specialSceneScriptState[object.scriptId];
_specialSceneScriptState[object.scriptId] = 1;
}
-
+
/*if (_currentTalkObject.STATim) {
_objectChatFinished = false;
while (!_objectChatFinished) {
@@ -371,7 +371,7 @@ void KyraEngine_v2::initTalkObject(int initObject) {
void KyraEngine_v2::deinitTalkObject(int initObject) {
TalkObject &object = _talkObjectList[initObject];
-
+
/*if (_currentTalkObject.ENDTim) {
_objectChatFinished = false;
while (!_objectChatFinished) {
@@ -382,25 +382,25 @@ void KyraEngine_v2::deinitTalkObject(int initObject) {
update();
}
}*/
-
+
if (object.scriptId != -1) {
_specialSceneScriptState[object.scriptId] = _specialSceneScriptStateBackup[object.scriptId];
}
-
+
if (_currentTalkSections.STATim != NULL) {
freeTIM(_currentTalkSections.STATim);
_currentTalkSections.STATim = NULL;
}
-
+
if (_currentTalkSections.TLKTim != NULL) {
freeTIM(_currentTalkSections.TLKTim);
_currentTalkSections.TLKTim = NULL;
}
-
+
if (_currentTalkSections.ENDTim != NULL) {
freeTIM(_currentTalkSections.ENDTim);
_currentTalkSections.ENDTim = NULL;
- }
+ }
}
byte *KyraEngine_v2::loadTIMFile(const char *filename, byte *buffer, int32 bufferSize) {
@@ -415,13 +415,13 @@ byte *KyraEngine_v2::loadTIMFile(const char *filename, byte *buffer, int32 buffe
error("No FORM chunk found in file: '%s'", filename);
return NULL;
}
-
+
if (formBlockSize < 20) {
return NULL;
}
formBlockSize += sizeof(TIMHeader) + 120 + sizeof(TIMStructUnk1) * 10;
-
+
TIMHeader *timHeader;
if (buffer == NULL || bufferSize < formBlockSize) {
buffer = new byte[formBlockSize];
@@ -429,9 +429,9 @@ byte *KyraEngine_v2::loadTIMFile(const char *filename, byte *buffer, int32 buffe
timHeader->deleteBufferFlag = 0xBABE;
} else {
timHeader = (TIMHeader *)buffer;
- timHeader->deleteBufferFlag = 0x0;
+ timHeader->deleteBufferFlag = 0x0;
}
-
+
int32 chunkSize = file.getIFFBlockSize(AVTL_CHUNK);
timHeader->unkFlag = -1;
timHeader->unkFlag2 = 0;
@@ -439,17 +439,17 @@ byte *KyraEngine_v2::loadTIMFile(const char *filename, byte *buffer, int32 buffe
timHeader->unkOffset2 = timHeader->unkOffset + sizeof(TIMStructUnk1) * 10;
timHeader->AVTLOffset = timHeader->unkOffset2 + 120;
timHeader->TEXTOffset = timHeader->AVTLOffset + chunkSize;
-
+
_TIMBuffers.AVTLChunk = (uint16 *)(buffer + timHeader->AVTLOffset);
_TIMBuffers.TEXTChunk = buffer + timHeader->TEXTOffset;
-
+
if (!file.loadIFFBlock(AVTL_CHUNK, _TIMBuffers.AVTLChunk, chunkSize)) {
error("Couldn't load AVTL chunk from file: '%s'", filename);
return NULL;
}
-
+
_TIMBuffers.UnkChunk = (TIMStructUnk1 *)(buffer + timHeader->unkOffset);
-
+
for (int i = 0; i < 10; i++) {
_TIMBuffers.UnkChunk[i].unk_0 = 0;
_TIMBuffers.UnkChunk[i].unk_2 = 0;
@@ -463,15 +463,15 @@ byte *KyraEngine_v2::loadTIMFile(const char *filename, byte *buffer, int32 buffe
if (!file.loadIFFBlock(TEXT_CHUNK, _TIMBuffers.TEXTChunk, chunkSize)) {
error("Couldn't load TEXT chunk from file: '%s'", filename);
return NULL;
- }
+ }
}
-
+
return buffer;
}
void KyraEngine_v2::freeTIM(byte *buffer) {
TIMHeader *timHeader = (TIMHeader *)buffer;
-
+
if (timHeader->deleteBufferFlag == 0xBABE) {
delete[] buffer;
}
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index 7c16d27d22..c0f47111c6 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -53,7 +53,7 @@ struct TimerResync : public Common::UnaryFunction<TimerEntry&, void> {
struct TimerEqual : public Common::UnaryFunction<const TimerEntry&, bool> {
uint8 _id;
-
+
TimerEqual(uint8 id) : _id(id) {}
bool operator()(const TimerEntry &entry) const {
@@ -80,13 +80,13 @@ void TimerManager::addTimer(uint8 id, TimerFunc *func, int countdown, bool enabl
}
TimerEntry newTimer;
-
+
newTimer.id = id;
newTimer.countdown = countdown;
newTimer.enabled = enabled ? 1 : 0;
newTimer.lastUpdate = newTimer.nextRun = 0;
newTimer.func = func;
-
+
_timers.push_back(newTimer);
}
@@ -95,7 +95,7 @@ void TimerManager::update() {
if (_system->getMillis() < _nextRun)
return;
-
+
_nextRun += 99999;
for (Iterator pos = _timers.begin(); pos != _timers.end(); ++pos) {
@@ -106,7 +106,7 @@ void TimerManager::update() {
uint32 curTime = _system->getMillis();
pos->lastUpdate = curTime;
pos->nextRun = curTime + pos->countdown * _vm->tickLength();
-
+
_nextRun = MIN(_nextRun, pos->nextRun);
}
}
@@ -116,7 +116,7 @@ void TimerManager::resync() {
debugC(9, kDebugLevelTimer, "TimerManager::resync()");
_nextRun = 0; // force rerun
- Common::for_each(_timers.begin(), _timers.end(), TimerResync(_vm, _system->getMillis()));
+ Common::for_each(_timers.begin(), _timers.end(), TimerResync(_vm, _system->getMillis()));
}
void TimerManager::resetNextRun() {
@@ -135,7 +135,7 @@ void TimerManager::setCountdown(uint8 id, int32 countdown) {
uint32 curTime = _system->getMillis();
timer->lastUpdate = curTime;
timer->nextRun = curTime + countdown * _vm->tickLength();
-
+
_nextRun = MIN(_nextRun, timer->nextRun);
}
} else {
@@ -197,14 +197,14 @@ void TimerManager::disable(uint8 id) {
void TimerManager::loadDataFromFile(Common::InSaveFile *file, int version) {
debugC(9, kDebugLevelTimer, "TimerManager::loadDataFromFile(%p, %d)", (const void*)file, version);
-
+
if (version <= 7) {
_nextRun = 0;
for (int i = 0; i < 32; ++i) {
uint8 enabled = file->readByte();
int32 countdown = file->readSint32BE();
uint32 nextRun = file->readUint32BE();
-
+
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(i));
if (timer != _timers.end()) {
timer->enabled = enabled;
@@ -220,7 +220,7 @@ void TimerManager::loadDataFromFile(Common::InSaveFile *file, int version) {
}
} else {
warning("Loading timer data for non existing timer %d", i);
- }
+ }
}
} else {
int entries = file->readByte();
@@ -237,14 +237,14 @@ void TimerManager::loadDataFromFile(Common::InSaveFile *file, int version) {
file->seek(7, SEEK_CUR);
}
}
-
+
resync();
}
}
void TimerManager::saveDataToFile(Common::OutSaveFile *file) const {
debugC(9, kDebugLevelTimer, "TimerManager::saveDataToFile(%p)", (const void*)file);
-
+
file->writeByte(count());
for (CIterator pos = _timers.begin(); pos != _timers.end(); ++pos) {
file->writeByte(pos->id);
diff --git a/engines/kyra/timer.h b/engines/kyra/timer.h
index 1edeb92a42..2c0251ffb7 100644
--- a/engines/kyra/timer.h
+++ b/engines/kyra/timer.h
@@ -43,11 +43,11 @@ typedef Functor1<int, void> TimerFunc;
struct TimerEntry {
uint8 id;
int32 countdown;
- int8 enabled;
+ int8 enabled;
int32 lastUpdate;
uint32 nextRun;
-
+
TimerFunc *func;
};
@@ -55,27 +55,27 @@ class TimerManager {
public:
TimerManager(KyraEngine *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0) {}
~TimerManager() { reset(); }
-
+
void reset();
-
+
void addTimer(uint8 id, TimerFunc *func, int countdown, bool enabled);
int count() const { return _timers.size(); }
-
+
void update();
-
+
void resetNextRun();
-
+
void setCountdown(uint8 id, int32 countdown);
void setDelay(uint8 id, int32 countdown);
int32 getDelay(uint8 id) const;
-
+
bool isEnabled(uint8 id) const;
void enable(uint8 id);
void disable(uint8 id);
void resync();
-
+
void loadDataFromFile(Common::InSaveFile *file, int version);
void saveDataToFile(Common::OutSaveFile *file) const;
private:
@@ -83,7 +83,7 @@ private:
OSystem *_system;
Common::List<TimerEntry> _timers;
uint32 _nextRun;
-
+
typedef Common::List<TimerEntry>::iterator Iterator;
typedef Common::List<TimerEntry>::const_iterator CIterator;
};
diff --git a/engines/kyra/timer_v1.cpp b/engines/kyra/timer_v1.cpp
index 55dab4413f..c02042f1cc 100644
--- a/engines/kyra/timer_v1.cpp
+++ b/engines/kyra/timer_v1.cpp
@@ -46,28 +46,28 @@ void KyraEngine_v1::setupTimers() {
_timer->addTimer(7, 0, 8, 1);
_timer->addTimer(8, 0, 9, 1);
_timer->addTimer(9, 0, 7, 1);
-
+
for (int i = 10; i <= 13; ++i)
_timer->addTimer(i, 0, 420, 1);
_timer->addTimer(14, TimerV1(timerCheckAnimFlag2), 600, 1);
_timer->addTimer(15, TimerV1(timerUpdateHeadAnims), 11, 1);
_timer->addTimer(16, TimerV1(timerSetFlags1), 7200, 1);
- _timer->addTimer(17, 0 /*sub_15120*/, 7200, 1);
+ _timer->addTimer(17, 0 /*sub_15120*/, 7200, 1);
_timer->addTimer(18, TimerV1(timerCheckAnimFlag1), 600, 1);
_timer->addTimer(19, TimerV1(timerRedrawAmulet), 600, 1);
-
+
_timer->addTimer(20, 0, 7200, 1);
_timer->addTimer(21, 0/*sub_1517C*/, 18000, 1);
_timer->addTimer(22, 0, 7200, 1);
-
+
for (int i = 23; i <= 27; ++i)
_timer->addTimer(i, 0, 10800, 1);
_timer->addTimer(28, 0, 21600, 1);
_timer->addTimer(29, 0, 7200, 1);
_timer->addTimer(30, 0, 10800, 1);
-
+
_timer->addTimer(31, TimerV1(timerFadeText), -1, 1);
_timer->addTimer(32, TimerV1(updateAnimFlag1), 9, 1);
_timer->addTimer(33, TimerV1(updateAnimFlag2), 3, 1);
@@ -141,7 +141,7 @@ void KyraEngine_v1::setTextFadeTimerCountdown(int16 countdown) {
void KyraEngine_v1::timerSetFlags2(int timerNum) {
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerSetFlags2(%i)", timerNum);
if (!((uint32*)(_flagsTable+0x2D))[timerNum])
- ((uint32*)(_flagsTable+0x2D))[timerNum] = 1;
+ ((uint32*)(_flagsTable+0x2D))[timerNum] = 1;
}
void KyraEngine_v1::timerCheckAnimFlag1(int timerNum) {
diff --git a/engines/kyra/timer_v2.cpp b/engines/kyra/timer_v2.cpp
index 1b12db4e9f..7a0fe5b03f 100644
--- a/engines/kyra/timer_v2.cpp
+++ b/engines/kyra/timer_v2.cpp
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#include "kyra/kyra_v2.h"
#include "kyra/timer.h"
@@ -32,7 +32,7 @@ namespace Kyra {
void KyraEngine_v2::setupTimers() {
debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v2::setupTimers()");
-
+
_timer->addTimer(0, 0, 5, 1);
_timer->addTimer(1, TimerV2(timerFunc2), -1, 1);
_timer->addTimer(2, TimerV2(timerCauldronAnimation), 1, 1);
@@ -96,7 +96,7 @@ void KyraEngine_v2::setTimer1DelaySecs(int secs) {
if (secs == -1)
secs = 32000;
-
+
_timer->setCountdown(1, secs * 60);
}
diff --git a/engines/kyra/util.h b/engines/kyra/util.h
index 072f4996f1..1c4b8462cc 100644
--- a/engines/kyra/util.h
+++ b/engines/kyra/util.h
@@ -42,9 +42,9 @@ template<class Res, class T>
class Functor0Mem : public Functor0<Res> {
public:
typedef Res (T::*FuncType)();
-
+
Functor0Mem(T *t, const FuncType &func) : _t(t), _func(func) {}
-
+
bool isValid() const { return _func != 0; }
Res operator()() const {
return (_t->*_func)();
@@ -66,9 +66,9 @@ template<class Arg, class Res, class T>
class Functor1Mem : public Functor1<Arg, Res> {
public:
typedef Res (T::*FuncType)(Arg);
-
+
Functor1Mem(T *t, const FuncType &func) : _t(t), _func(func) {}
-
+
bool isValid() const { return _func != 0; }
Res operator()(Arg v1) const {
return (_t->*_func)(v1);
diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h
index 53f1819b30..5e97e1a5fb 100644
--- a/engines/kyra/wsamovie.h
+++ b/engines/kyra/wsamovie.h
@@ -57,7 +57,7 @@ public:
protected:
KyraEngine *_vm;
bool _opened;
-
+
int _x, _y;
int _drawPage;
};
@@ -103,7 +103,7 @@ public:
void close();
void displayFrame(int frameNum, ...);
-private:
+private:
void processFrame(int frameNum, uint8 *dst);
uint8 *_buffer;
@@ -112,23 +112,23 @@ private:
class WSAMovieV2 : public WSAMovieV1 {
public:
WSAMovieV2(KyraEngine_v2 *vm);
-
+
int open(const char *filename, int unk1, uint8 *palette);
-
+
virtual void displayFrame(int frameNum, ...);
void setX(int x) { _x = x + _xAdd; }
void setY(int y) { _y = y + _yAdd; }
-
+
int xAdd() const { return _xAdd; }
int yAdd() const { return _yAdd; }
-
+
int width() const { return _width; }
int height() const { return _height; }
void setWidth(int w) { _width = w; }
void setHeight(int h) { _height = h; }
-
+
// HACK for our intro code
void flagOldOff(bool enabled) { _oldOff = enabled; }
protected:
diff --git a/engines/lure/animseq.cpp b/engines/lure/animseq.cpp
index aaba884a62..2af02b0374 100644
--- a/engines/lure/animseq.cpp
+++ b/engines/lure/animseq.cpp
@@ -48,7 +48,7 @@ AnimAbortType AnimationSequence::delay(uint32 milliseconds) {
else return ABORT_NEXT_SCENE;
} else if (events.type() == Common::EVENT_LBUTTONDOWN)
return ABORT_NEXT_SCENE;
- else if (events.type() == Common::EVENT_QUIT)
+ else if (events.type() == Common::EVENT_QUIT)
return ABORT_END_INTRO;
}
@@ -64,7 +64,7 @@ AnimAbortType AnimationSequence::delay(uint32 milliseconds) {
void AnimationSequence::egaDecodeFrame(byte *&pPixels) {
Screen &screen = Screen::getReference();
- byte *screenData = screen.screen_raw();
+ byte *screenData = screen.screen_raw();
// Skip over the list of blocks that are changed
int numBlocks = *pPixels++;
@@ -72,7 +72,7 @@ void AnimationSequence::egaDecodeFrame(byte *&pPixels) {
// Loop through the list of same/changed pixel ranges
int len = *pPixels++;
- int offset = MENUBAR_Y_SIZE * FULL_SCREEN_WIDTH *
+ int offset = MENUBAR_Y_SIZE * FULL_SCREEN_WIDTH *
EGA_NUM_LAYERS / EGA_PIXELS_PER_BYTE;
while ((offset += len) < FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT / 2) {
@@ -80,7 +80,7 @@ void AnimationSequence::egaDecodeFrame(byte *&pPixels) {
if (repeatLen > 0) {
byte *pDest = screenData + (offset / EGA_NUM_LAYERS) * EGA_PIXELS_PER_BYTE;
- // Copy over the following bytes - each four bytes contain the four
+ // Copy over the following bytes - each four bytes contain the four
// planes worth of data for 8 sequential pixels
while (repeatLen-- > 0) {
int planeNum = offset % EGA_NUM_LAYERS;
@@ -107,7 +107,7 @@ void AnimationSequence::egaDecodeFrame(byte *&pPixels) {
void AnimationSequence::vgaDecodeFrame(byte *&pPixels, byte *&pLines) {
Screen &screen = Screen::getReference();
- byte *screenData = screen.screen_raw();
+ byte *screenData = screen.screen_raw();
uint16 screenPos = 0;
uint16 len;
@@ -118,7 +118,7 @@ void AnimationSequence::vgaDecodeFrame(byte *&pPixels, byte *&pLines) {
len = READ_LE_UINT16(pLines);
pLines += 2;
}
-
+
// Move the splice over
memcpy(screenData, pPixels, len);
screenData += len;
@@ -137,14 +137,14 @@ void AnimationSequence::vgaDecodeFrame(byte *&pPixels, byte *&pLines) {
}
}
-AnimationSequence::AnimationSequence(uint16 screenId, Palette &palette, bool fadeIn, int frameDelay,
- const AnimSoundSequence *soundList): _screenId(screenId), _palette(palette),
+AnimationSequence::AnimationSequence(uint16 screenId, Palette &palette, bool fadeIn, int frameDelay,
+ const AnimSoundSequence *soundList): _screenId(screenId), _palette(palette),
_frameDelay(frameDelay), _soundList(soundList) {
Screen &screen = Screen::getReference();
PictureDecoder decoder;
Disk &d = Disk::getReference();
- // Get the data and decode it. Note that VGA decompression is used
+ // Get the data and decode it. Note that VGA decompression is used
// even if the decompressed contents is actually EGA data
MemoryBlock *data = d.getEntry(_screenId);
_decodedData = decoder.vgaDecode(data, MAX_ANIM_DECODER_BUFFER_SIZE);
@@ -158,14 +158,14 @@ AnimationSequence::AnimationSequence(uint16 screenId, Palette &palette, bool fa
// Reset the palette and clear the screen for EGA decoding
screen.setPaletteEmpty(RES_PALETTE_ENTRIES);
screen.screen().empty();
-
+
// Load the screen - each four bytes contain the four planes
// worth of data for 8 sequential pixels
byte *pSrc = _decodedData->data();
byte *pDest = screen.screen().data().data() +
(FULL_SCREEN_WIDTH * MENUBAR_Y_SIZE);
- for (int ctr = 0; ctr < FULL_SCREEN_WIDTH * (FULL_SCREEN_HEIGHT -
+ for (int ctr = 0; ctr < FULL_SCREEN_WIDTH * (FULL_SCREEN_HEIGHT -
MENUBAR_Y_SIZE) / 8; ++ctr, pDest += EGA_PIXELS_PER_BYTE) {
for (int planeCtr = 0; planeCtr < EGA_NUM_LAYERS; ++planeCtr, ++pSrc) {
byte v = *pSrc;
@@ -225,10 +225,10 @@ AnimAbortType AnimationSequence::show() {
while (_pPixels < _pPixelsEnd) {
if ((soundFrame != NULL) && (frameCtr == 0))
Sound.musicInterface_Play(
- Sound.isRoland() ? soundFrame->rolandSoundId : soundFrame->adlibSoundId,
+ Sound.isRoland() ? soundFrame->rolandSoundId : soundFrame->adlibSoundId,
soundFrame->channelNum);
- if (_isEGA)
+ if (_isEGA)
egaDecodeFrame(_pPixels);
else {
if (_pLines >= _pLinesEnd) break;
@@ -254,8 +254,8 @@ AnimAbortType AnimationSequence::show() {
bool AnimationSequence::step() {
Screen &screen = Screen::getReference();
if (_pPixels >= _pPixelsEnd) return false;
-
- if (_isEGA)
+
+ if (_isEGA)
egaDecodeFrame(_pPixels);
else {
if (_pLines >= _pLinesEnd) return false;
diff --git a/engines/lure/animseq.h b/engines/lure/animseq.h
index a4e8034f5c..3609837dba 100644
--- a/engines/lure/animseq.h
+++ b/engines/lure/animseq.h
@@ -55,7 +55,7 @@ private:
void egaDecodeFrame(byte *&pPixels);
void vgaDecodeFrame(byte *&pPixels, byte *&pLines);
public:
- AnimationSequence(uint16 screenId, Palette &palette, bool fadeIn, int frameDelay = 7,
+ AnimationSequence(uint16 screenId, Palette &palette, bool fadeIn, int frameDelay = 7,
const AnimSoundSequence *soundList = NULL);
~AnimationSequence();
diff --git a/engines/lure/debugger.cpp b/engines/lure/debugger.cpp
index 63955003a4..e5d1995861 100644
--- a/engines/lure/debugger.cpp
+++ b/engines/lure/debugger.cpp
@@ -557,13 +557,13 @@ bool Debugger::cmd_saveStrings(int argc, const char **argv) {
strings.getString(id, buffer, NULL, NULL);
DebugPrintf("%s\n", buffer);
-/* Commented out code for saving all text strings - note that 0x1000 is chosen
+/* Commented out code for saving all text strings - note that 0x1000 is chosen
* arbitrarily, so there'll be a bunch of garbage at the end, or the game will crash
- // Save all the strings to a text file - this
+ // Save all the strings to a text file - this
FILE *f = fopen("strings.txt", "w");
-
+
for (int index = 0; index < 0x1000; ++index) {
strings.getString(index, buffer);
fprintf(f, "%.4xh - %s\n", index, buffer);
diff --git a/engines/lure/decode.cpp b/engines/lure/decode.cpp
index 53a5157c7a..26eec5ba6d 100644
--- a/engines/lure/decode.cpp
+++ b/engines/lure/decode.cpp
@@ -38,13 +38,13 @@ namespace Lure {
/*--------------------------------------------------------------------------*/
void PictureDecoder::writeByte(MemoryBlock *dest, byte v) {
- if (outputOffset == dest->size())
+ if (outputOffset == dest->size())
error("Decoded data exceeded allocated output buffer size");
dest->data()[outputOffset++] = v;
}
void PictureDecoder::writeBytes(MemoryBlock *dest, byte v, uint16 numBytes) {
- if (outputOffset + numBytes > dest->size())
+ if (outputOffset + numBytes > dest->size())
error("Decoded data exceeded allocated output buffer size");
dest->setBytes(v, outputOffset, numBytes);
outputOffset += numBytes;
@@ -110,7 +110,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
uint16 dx = READ_BE_UINT16(src->data() + dataPos);
dataPos += sizeof(uint16);
int bitCtr = 8;
-
+
// Decode the colour popularity table
for (int nibbleCtr = 0; nibbleCtr < 32; ++nibbleCtr) {
@@ -180,7 +180,7 @@ MemoryBlock *PictureDecoder::egaDecode(MemoryBlock *src, uint32 maxOutputSize) {
writeBytes(dest, tableOffset, dx >> 11);
READ_BITS(5);
continue;
-
+
} else {
// It's a new colour
v = al;
@@ -308,15 +308,15 @@ void AnimationDecoder::rcl(uint16 &value, bool &carry) {
#define SET_HI_BYTE(x,v) x = (x & 0xff) | ((v) << 8);
#define SET_LO_BYTE(x,v) x = (x & 0xff00) | (v);
-void AnimationDecoder::decode_data_2(MemoryBlock *src, byte *&pSrc, uint16 &currData,
+void AnimationDecoder::decode_data_2(MemoryBlock *src, byte *&pSrc, uint16 &currData,
uint16 &bitCtr, uint16 &dx, bool &carry) {
SET_HI_BYTE(dx, currData >> 8);
-
+
for (int v = 0; v < 8; ++v) {
rcl(currData, carry);
if (--bitCtr == 0) {
uint32 offset = (uint32) (pSrc - src->data());
- if (offset >= src->size())
+ if (offset >= src->size())
// Beyond end of source, so read in a 0 value
currData &= 0xff00;
else
@@ -346,7 +346,7 @@ uint32 AnimationDecoder::decode_data(MemoryBlock *src, MemoryBlock *dest, uint32
currData = *pSrc++;
*(pDest + 0x30) = currData & 0xf;
*(pDest + 0x20) = (currData >> 4) & 0xf;
- }
+ }
pDest = (byte *) (dest->data() + 0x40);
currData = READ_BE_UINT16(pSrc);
@@ -424,14 +424,14 @@ loc_1441:
tempReg1 = bitCtr;
tempReg2 = dx;
decode_data_2(src, pSrc, currData, bitCtr, dx, carry);
-
+
SET_LO_BYTE(dx, dx >> 8);
decode_data_2(src, pSrc, currData, bitCtr, dx, carry);
SET_HI_BYTE(bitCtr, dx & 0xff);
SET_LO_BYTE(bitCtr, dx >> 8);
dx = tempReg2;
- if (bitCtr == 0)
+ if (bitCtr == 0)
// Exit out of infinite loop
break;
@@ -453,7 +453,7 @@ loc_1441:
tempReg1 = bitCtr;
bitCtr = dx >> 8;
-
+
} else if (dxHigh == BX_VAL(0x30)) {
SET_HI_BYTE(dx, currData >> 11);
diff --git a/engines/lure/decode.h b/engines/lure/decode.h
index c127d95dbd..9cc594df64 100644
--- a/engines/lure/decode.h
+++ b/engines/lure/decode.h
@@ -58,7 +58,7 @@ class AnimationDecoder {
public:
static void rcl(uint16 &value, bool &carry);
static uint32 decode_data(MemoryBlock *src, MemoryBlock *dest, uint32 srcPos);
- static void decode_data_2(MemoryBlock *src, byte *&pSrc, uint16 &currData,
+ static void decode_data_2(MemoryBlock *src, byte *&pSrc, uint16 &currData,
uint16 &bitCtr, uint16 &dx, bool &carry);
};
diff --git a/engines/lure/fights.cpp b/engines/lure/fights.cpp
index 9b28c0e0b8..dcf09ba50d 100644
--- a/engines/lure/fights.cpp
+++ b/engines/lure/fights.cpp
@@ -47,7 +47,7 @@ FightsManager::FightsManager() {
reset();
}
-FightsManager::~FightsManager() {
+FightsManager::~FightsManager() {
if (_fightData != NULL)
// Release the fight data
delete _fightData;
@@ -131,7 +131,7 @@ void FightsManager::fightLoop() {
if (game.debugger().isAttached())
game.debugger().onFrame();
- g_system->delayMillis(10);
+ g_system->delayMillis(10);
}
}
@@ -169,7 +169,7 @@ void FightsManager::reset() {
_fighterList[2] = initialFighterList[2];
}
-const CursorType moveList[] = {CURSOR_LEFT_ARROW, CURSOR_FIGHT_UPPER,
+const CursorType moveList[] = {CURSOR_LEFT_ARROW, CURSOR_FIGHT_UPPER,
CURSOR_FIGHT_MIDDLE, CURSOR_FIGHT_LOWER, CURSOR_RIGHT_ARROW};
struct KeyMapping {
@@ -178,9 +178,9 @@ struct KeyMapping {
};
const KeyMapping keyList[] = {
- {Common::KEYCODE_LEFT, 10}, {Common::KEYCODE_RIGHT, 14},
- {Common::KEYCODE_KP7, 11}, {Common::KEYCODE_KP4, 12}, {Common::KEYCODE_KP1, 13},
- {Common::KEYCODE_KP9, 6}, {Common::KEYCODE_KP6, 7}, {Common::KEYCODE_KP3, 8},
+ {Common::KEYCODE_LEFT, 10}, {Common::KEYCODE_RIGHT, 14},
+ {Common::KEYCODE_KP7, 11}, {Common::KEYCODE_KP4, 12}, {Common::KEYCODE_KP1, 13},
+ {Common::KEYCODE_KP9, 6}, {Common::KEYCODE_KP6, 7}, {Common::KEYCODE_KP3, 8},
{Common::KEYCODE_INVALID, 0}};
void FightsManager::checkEvents() {
@@ -224,7 +224,7 @@ void FightsManager::checkEvents() {
} else if (events.type() == Common::EVENT_MOUSEMOVE) {
Point mPos = events.event().mouse;
- if (mPos.x < rec.fwtrue_x - 12)
+ if (mPos.x < rec.fwtrue_x - 12)
mouse.setCursorNum(CURSOR_LEFT_ARROW);
else if (mPos.x > rec.fwtrue_x + player->width())
mouse.setCursorNum(CURSOR_RIGHT_ARROW);
@@ -232,9 +232,9 @@ void FightsManager::checkEvents() {
mouse.setCursorNum(CURSOR_FIGHT_UPPER);
else if (mPos.y < player->y() + 38)
mouse.setCursorNum(CURSOR_FIGHT_MIDDLE);
- else
+ else
mouse.setCursorNum(CURSOR_FIGHT_LOWER);
-
+
} else if ((events.type() == Common::EVENT_LBUTTONDOWN) ||
(events.type() == Common::EVENT_RBUTTONDOWN) ||
(events.type() == Common::EVENT_LBUTTONUP) ||
@@ -261,11 +261,11 @@ void FightsManager::checkEvents() {
rec.fwmove_number = moveNumber;
- if (_keyDown == KS_KEYDOWN_1)
+ if (_keyDown == KS_KEYDOWN_1)
_keyDown = KS_KEYDOWN_2;
if (rec.fwmove_number >= 5)
- debugC(ERROR_INTERMEDIATE, kLureDebugFights,
+ debugC(ERROR_INTERMEDIATE, kLureDebugFights,
"Player fight move number=%d", rec.fwmove_number);
}
@@ -293,14 +293,14 @@ void FightsManager::fighterAnimHandler(Hotspot &h) {
offset += 4;
v = getWord(offset);
}
-
+
if (v == 0) {
// No sequence match found
seqNum = getFighterMove(fighter, fighter.fwattack_table);
} else {
v = getWord(offset + 2);
seqNum = getFighterMove(fighter, fighter.fwdefend_table);
-
+
if (seqNum == 0)
seqNum = getFighterMove(fighter, fighter.fwattack_table);
else if (seqNum == 0xff)
@@ -331,11 +331,11 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
// Player is doing nothing, so check the move number
moveOffset = getWord(FIGHT_PLAYER_MOVE_TABLE + (fighter.fwmove_number << 1));
- debugC(ERROR_DETAILED, kLureDebugFights,
- "Hotspot %xh fight move=%d, new offset=%xh",
+ debugC(ERROR_DETAILED, kLureDebugFights,
+ "Hotspot %xh fight move=%d, new offset=%xh",
h.hotspotId(), fighter.fwmove_number, moveOffset);
- if (moveOffset == 0)
+ if (moveOffset == 0)
return;
fighter.fwseq_no = fighter.fwmove_number;
@@ -343,15 +343,15 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
}
uint16 moveValue = getWord(moveOffset);
- debugC(ERROR_DETAILED, kLureDebugFights,
- "Hotspot %xh script offset=%xh value=%xh",
+ debugC(ERROR_DETAILED, kLureDebugFights,
+ "Hotspot %xh script offset=%xh value=%xh",
h.hotspotId(), moveOffset, moveValue);
moveOffset += sizeof(uint16);
if ((moveValue & 0x8000) == 0) {
// Set frame to specified number
h.setFrameNumber(moveValue);
-
+
// Set the new fighter position
int16 newX, newY;
newX = h.x() + (int16)getWord(moveOffset);
@@ -363,7 +363,7 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
if (fighter.fwweapon != 0) {
Hotspot *weaponHotspot = res.getActiveHotspot(fighter.fwweapon);
assert(weaponHotspot);
-
+
uint16 newFrameNumber = getWord(moveOffset + 4);
int16 xChange = (int16)getWord(moveOffset + 6);
int16 yChange = (int16)getWord(moveOffset + 8);
@@ -408,7 +408,7 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
moveOffset = 0;
}
break;
-
+
case 0xFFF9:
// Walk right
if ((fighter.fwmove_number == 9) || (fighter.fwmove_number == 14)) {
@@ -419,8 +419,8 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
h.setPosition(h.x() + 4, h.y());
fighter.fwtrue_x = h.x();
fighter.fwtrue_y = h.y();
-
- fighter.fwwalk_roll = (fighter.fwwalk_roll == 0) ? 7 :
+
+ fighter.fwwalk_roll = (fighter.fwwalk_roll == 0) ? 7 :
fighter.fwwalk_roll - 1;
fighter.fwseq_ad = moveOffset;
h.setFrameNumber(fighter.fwwalk_roll);
@@ -450,7 +450,7 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
fighter.fwseq_ad = moveOffset;
}
return;
-
+
case 0xFFFB:
// End of sequence
breakFlag = true;
@@ -463,10 +463,10 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
case 0xFFFF:
case 0xFFFE:
- if (moveValue == 0xffff)
+ if (moveValue == 0xffff)
// Set the animation record
h.setAnimation(getWord(moveOffset));
- else
+ else
// New set animation record
h.setAnimation(getWord(fighter.fwheader_list + (getWord(moveOffset) << 1)));
h.setFrameNumber(0);
@@ -480,7 +480,7 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
else
moveOffset += 2 * sizeof(uint16);
break;
-
+
case 0xFFF6:
// Not hold
if (getWord(moveOffset) == fighter.fwmove_number)
@@ -488,7 +488,7 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
else
moveOffset = getWord(moveOffset + 2);
break;
-
+
case 0xFFF4:
// End sequence
fighter.fwseq_no = 0;
@@ -525,7 +525,7 @@ void FightsManager::fightHandler(Hotspot &h, uint16 moveOffset) {
opponent.fwseq_ad = v1;
if (++opponent.fwhit_value != opponent.fwhit_rate) {
opponent.fwhit_value = 0;
- if (++opponent.fwhits == 5)
+ if (++opponent.fwhits == 5)
opponent.fwseq_ad = opponent.fwdie_seq;
}
}
@@ -589,7 +589,7 @@ uint16 FightsManager::fetchFighterDistance(FighterRecord &f1, FighterRecord &f2)
void FightsManager::enemyKilled() {
Resources &res = Resources::getReference();
- Hotspot *playerHotspot = res.getActiveHotspot(PLAYER_ID);
+ Hotspot *playerHotspot = res.getActiveHotspot(PLAYER_ID);
FighterRecord &playerRec = getDetails(PLAYER_ID);
playerHotspot->setTickProc(PLAYER_TICK_PROC_ID);
@@ -601,7 +601,7 @@ void FightsManager::enemyKilled() {
playerHotspot->setAnimationIndex(PLAYER_ANIM_INDEX);
playerHotspot->setPosition(playerHotspot->x(), playerHotspot->y() + 5);
playerHotspot->setDirection(LEFT);
-
+
if (playerHotspot->roomNumber() == 6) {
Dialog::show(0xc9f);
HotspotData *axeHotspot = res.getHotspot(0x2738);
@@ -610,7 +610,7 @@ void FightsManager::enemyKilled() {
// Prevent the weapon animation being drawn
axeHotspot = res.getHotspot(0x440);
- axeHotspot->layer = 0;
+ axeHotspot->layer = 0;
}
}
diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp
index 5d5407886c..dfdcbfe956 100644
--- a/engines/lure/game.cpp
+++ b/engines/lure/game.cpp
@@ -63,7 +63,7 @@ Game::~Game() {
void Game::tick() {
// Call the tick method for each hotspot - this is somewaht complicated
// by the fact that a tick proc can unload both itself and/or others,
- // so we first get a list of the Ids, and call the tick proc for each
+ // so we first get a list of the Ids, and call the tick proc for each
// id in sequence if it's still active
Resources &res = Resources::getReference();
ValueTableData &fields = res.fieldList();
@@ -74,7 +74,7 @@ void Game::tick() {
for (i = res.activeHotspots().begin(); i != res.activeHotspots().end(); ++i) {
Hotspot *hotspot = *i;
- if (!_preloadFlag || ((hotspot->layer() != 0xff) &&
+ if (!_preloadFlag || ((hotspot->layer() != 0xff) &&
(hotspot->hotspotId() < FIRST_NONCHARACTER_ID)))
// Add hotspot to list to execute
idList[idSize++] = hotspot->hotspotId();
@@ -100,7 +100,7 @@ void Game::tickCheck() {
_state |= GS_TICK;
if ((room.roomNumber() == ROOMNUM_VILLAGE_SHOP) && !remoteFlag && ((_state & GS_TICK) != 0)) {
- // In the village shop,
+ // In the village shop,
bool tockFlag = (_state & GS_TOCK) != 0;
Sound.addSound(tockFlag ? 16 : 50);
@@ -112,7 +112,7 @@ void Game::nextFrame() {
Resources &res = Resources::getReference();
Room &room = Room::getReference();
- if (Fights.isFighting())
+ if (Fights.isFighting())
Fights.fightLoop();
res.pausedList().countdown();
@@ -139,11 +139,11 @@ void Game::execute() {
screen.setPaletteEmpty();
// Flag for starting game
- setState(GS_RESTART);
+ setState(GS_RESTART);
bool initialRestart = true;
while (!events.quitFlag) {
-
+
if ((_state & GS_RESTART) != 0) {
res.reset();
Fights.reset();
@@ -208,8 +208,8 @@ void Game::execute() {
case Common::KEYCODE_KP_PLUS:
if (_debugFlag) {
- while (++roomNum <= 51)
- if (res.getRoom(roomNum) != NULL) break;
+ while (++roomNum <= 51)
+ if (res.getRoom(roomNum) != NULL) break;
if (roomNum == 52) roomNum = 1;
room.setRoomNumber(roomNum);
}
@@ -224,14 +224,14 @@ void Game::execute() {
break;
case Common::KEYCODE_KP_MULTIPLY:
- if (_debugFlag)
+ if (_debugFlag)
res.getActiveHotspot(PLAYER_ID)->setRoomNumber(
room.roomNumber());
break;
case Common::KEYCODE_KP_DIVIDE:
case Common::KEYCODE_SLASH:
- if (_debugFlag)
+ if (_debugFlag)
room.setShowInfo(!room.showInfo());
break;
@@ -247,7 +247,7 @@ void Game::execute() {
}
if ((events.type() == Common::EVENT_LBUTTONDOWN) ||
- (events.type() == Common::EVENT_RBUTTONDOWN))
+ (events.type() == Common::EVENT_RBUTTONDOWN))
handleClick();
}
@@ -287,7 +287,7 @@ void Game::execute() {
// If the Restart/Restore dialog is needed, show it
if ((_state & GS_RESTORE) != 0) {
- // Show the Restore/Restart dialog
+ // Show the Restore/Restart dialog
bool restartFlag = RestartRestoreDialog::show();
if (restartFlag)
@@ -307,7 +307,7 @@ void Game::handleMenuResponse(uint8 selection) {
doShowCredits();
break;
- case MENUITEM_RESTART_GAME:
+ case MENUITEM_RESTART_GAME:
doRestart();
break;
@@ -315,7 +315,7 @@ void Game::handleMenuResponse(uint8 selection) {
SaveRestoreDialog::show(true);
break;
- case MENUITEM_RESTORE_GAME:
+ case MENUITEM_RESTORE_GAME:
SaveRestoreDialog::show(false);
break;
@@ -355,7 +355,7 @@ void Game::playerChangeRoom() {
displayChuteAnimation();
else if (animFlag != 0)
displayBarrelAnimation();
-
+
fields.setField(ROOM_EXIT_ANIMATION, 0);
roomData->exitTime = g_system->getMillis();
@@ -373,7 +373,7 @@ void Game::playerChangeRoom() {
if (v != 0) {
--v;
fields.setField(29, v);
- if (v == 0)
+ if (v == 0)
res.delayList().add(2, 0xCB7, false);
}
}
@@ -395,12 +395,12 @@ void Game::displayChuteAnimation() {
AnimationSequence *anim = new AnimationSequence(CHUTE_ANIM_ID, palette, false);
anim->show();
delete anim;
-
- anim = new AnimationSequence(CHUTE2_ANIM_ID, palette, false);
+
+ anim = new AnimationSequence(CHUTE2_ANIM_ID, palette, false);
anim->show();
delete anim;
- anim = new AnimationSequence(CHUTE3_ANIM_ID, palette, false);
+ anim = new AnimationSequence(CHUTE3_ANIM_ID, palette, false);
anim->show();
delete anim;
@@ -442,7 +442,7 @@ void Game::handleClick() {
// Viewing a room remotely - handle returning to prior room
if ((room.roomNumber() != 35) || (fields.getField(87) == 0)) {
// Reset player tick proc and signal to change back to the old room
- res.getActiveHotspot(PLAYER_ID)->setTickProc(PLAYER_TICK_PROC_ID);
+ res.getActiveHotspot(PLAYER_ID)->setTickProc(PLAYER_TICK_PROC_ID);
fields.setField(NEW_ROOM_NUMBER, oldRoomNumber);
fields.setField(OLD_ROOM_NUMBER, 0);
}
@@ -454,7 +454,7 @@ void Game::handleClick() {
if (response != MENUITEM_NONE)
handleMenuResponse(response);
} else if ((room.cursorState() == CS_SEQUENCE) ||
- (room.cursorState() == CS_BUMPED)) {
+ (room.cursorState() == CS_BUMPED)) {
// No action necessary
} else {
if (mouse.lButton())
@@ -489,7 +489,7 @@ void Game::handleRightClickMenu() {
}
// If no inventory items remove entries that require them
- if (res.numInventoryItems() == 0)
+ if (res.numInventoryItems() == 0)
actions &= 0xFEF3F9FD;
// If the player hasn't any money, remove any bribe entry
@@ -556,16 +556,16 @@ void Game::handleRightClickMenu() {
hotspot = res.getHotspot(room.hotspotId());
itemId = PopupMenu::ShowInventory();
breakFlag = (itemId != 0xffff);
- if (breakFlag) {
+ if (breakFlag) {
fields.setField(USE_HOTSPOT_ID, itemId);
if ((action == GIVE) || (action == USE)) {
// Add in the "X to " or "X on " section of give/use action
useHotspot = res.getHotspot(itemId);
assert(useHotspot);
strings.getString(useHotspot->nameId, statusLine);
- if (action == GIVE)
+ if (action == GIVE)
strcat(statusLine, stringList.getString(S_TO));
- else
+ else
strcat(statusLine, stringList.getString(S_ON));
statusLine += strlen(statusLine);
}
@@ -621,7 +621,7 @@ void Game::handleLeftClick() {
player->setActionCtr(0);
strcpy(room.statusLine(), "");
- if ((room.destRoomNumber() == 0) && (room.hotspotId() != 0)) {
+ if ((room.destRoomNumber() == 0) && (room.hotspotId() != 0)) {
// Handle look at hotspot
sprintf(room.statusLine(), "%s ", stringList.getString(LOOK_AT));
HotspotData *hotspot = res.getHotspot(room.hotspotId());
@@ -631,10 +631,10 @@ void Game::handleLeftClick() {
} else if (room.destRoomNumber() != 0) {
// Walk to another room
- RoomExitCoordinateData &exitData =
+ RoomExitCoordinateData &exitData =
res.coordinateList().getEntry(room.roomNumber()).getData(room.destRoomNumber());
- player->walkTo((exitData.x & 0xfff8) | 5, (exitData.y & 0xfff8),
+ player->walkTo((exitData.x & 0xfff8) | 5, (exitData.y & 0xfff8),
room.hotspotId() == 0 ? 0xffff : room.hotspotId());
} else {
// Walking within room
@@ -670,7 +670,7 @@ bool Game::GetTellActions() {
while ((_numTellCommands >= 0) && (_numTellCommands < MAX_TELL_COMMANDS)) {
- // Loop for each sub-part of commands: Action, up to two params, and
+ // Loop for each sub-part of commands: Action, up to two params, and
// a "and then" selection to allow for more commands
while ((paramIndex >= 0) && (paramIndex <= 4)) {
@@ -687,7 +687,7 @@ bool Game::GetTellActions() {
if (action == NONE) {
// Move backwards to prior specified action
--_numTellCommands;
- if (_numTellCommands < 0)
+ if (_numTellCommands < 0)
paramIndex = -1;
else {
paramIndex = 3;
@@ -709,10 +709,10 @@ bool Game::GetTellActions() {
case 1:
// First parameter
- action = (Action) commands[_numTellCommands * 3];
+ action = (Action) commands[_numTellCommands * 3];
if (action != RETURN) {
// Prompt for selection
- if ((action != USE) && (action != DRINK) && (action != GIVE))
+ if ((action != USE) && (action != DRINK) && (action != GIVE))
selectionId = PopupMenu::ShowItems(action, *roomList.begin());
else
selectionId = PopupMenu::ShowItems(GET, *roomList.begin());
@@ -724,7 +724,7 @@ bool Game::GetTellActions() {
*statusLine = '\0';
break;
}
-
+
if (selectionId < NOONE_ID) {
// Must be a room selection
strings.getString(selectionId, selectionName);
@@ -745,7 +745,7 @@ bool Game::GetTellActions() {
case 2:
// Second parameter
- action = (Action) commands[_numTellCommands * 3];
+ action = (Action) commands[_numTellCommands * 3];
if (action == ASK)
strcat(statusLine, stringList.getString(S_FOR));
else if (action == GIVE)
@@ -803,7 +803,7 @@ bool Game::GetTellActions() {
default:
// Move to end of just completed command
- action = (Action) commands[_numTellCommands * 3];
+ action = (Action) commands[_numTellCommands * 3];
if (action == RETURN)
paramIndex = 0;
else if ((action == ASK) || (action == GIVE) || (action == USE))
@@ -870,18 +870,18 @@ void Game::doShowCredits() {
Sound.pause();
mouse.cursorOff();
-
+
Surface *s = Surface::getScreen(CREDITS_RESOURCE_ID);
-
+
if (isEGA) {
s->copyToScreen(0, 0);
} else {
Palette p(CREDITS_RESOURCE_ID - 1);
screen.setPaletteEmpty();
s->copyToScreen(0, 0);
- screen.setPalette(&p);
+ screen.setPalette(&p);
}
-
+
delete s;
events.waitForPress();
@@ -892,7 +892,7 @@ void Game::doShowCredits() {
void Game::doQuit() {
Sound.pause();
- if (getYN())
+ if (getYN())
Events::getReference().quitFlag = true;
Sound.resume();
}
@@ -944,7 +944,7 @@ void Game::handleBootParam(int value) {
h->setPosition(140, 120);
h->currentActions().top().setSupportData(0x1400);
fields.setField(11, 1);
-
+
// Set up player
h = res.getActiveHotspot(PLAYER_ID);
h->setRoomNumber(4);
@@ -978,7 +978,7 @@ bool Game::getYN() {
Events &events = Events::getReference();
Screen &screen = Screen::getReference();
Resources &res = Resources::getReference();
-
+
Common::Language l = LureEngine::getReference().getLanguage();
Common::KeyCode y = Common::KEYCODE_y;
if (l == FR_FRA) y = Common::KEYCODE_o;
@@ -996,7 +996,7 @@ bool Game::getYN() {
delete s;
bool breakFlag = false;
- bool result = false;
+ bool result = false;
do {
while (events.pollEvent()) {
@@ -1035,11 +1035,11 @@ bool Game::isMenuAvailable() {
Room &room = Room::getReference();
uint16 oldRoomNumber = res.fieldList().getField(OLD_ROOM_NUMBER);
- if (oldRoomNumber != 0)
+ if (oldRoomNumber != 0)
// Viewing a room remotely - so the menu isn't available
return false;
-
- else if ((room.cursorState() == CS_TALKING) || (res.getTalkState() != TALK_NONE))
+
+ else if ((room.cursorState() == CS_TALKING) || (res.getTalkState() != TALK_NONE))
return false;
return true;
diff --git a/engines/lure/hotspots.cpp b/engines/lure/hotspots.cpp
index 9dba7a55f4..cd9daa3265 100644
--- a/engines/lure/hotspots.cpp
+++ b/engines/lure/hotspots.cpp
@@ -151,7 +151,7 @@ Hotspot::Hotspot(Hotspot *character, uint16 objType): _pathFinder(this) {
_tickHandler = HotspotTickHandlers::getHandler(PUZZLED_TICK_PROC_ID);
setAnimationIndex(VOICE_ANIM_INDEX);
setFrameNumber(objType == PUZZLED_ANIM_IDX ? 1 : 2);
-
+
character->setFrameCtr(_voiceCtr);
break;
@@ -209,14 +209,14 @@ void Hotspot::setAnimation(uint16 newAnimId) {
if (_data)
_data->animRecordId = newAnimId;
- if (newAnimId == 0)
+ if (newAnimId == 0)
tempAnim = NULL;
else {
- tempAnim = r.getAnimation(newAnimId);
+ tempAnim = r.getAnimation(newAnimId);
if (tempAnim == NULL)
error("Hotspot %xh tried to set non-existant Animation Id: %xh", _hotspotId, newAnimId);
}
-
+
setAnimation(tempAnim);
}
@@ -225,7 +225,7 @@ void Hotspot::setAnimationIndex(int animIndex) {
// Get the animation specified
HotspotAnimData *tempAnim = r.animRecords()[animIndex];
-
+
_animId = tempAnim->animRecordId;
if (_data)
_data->animRecordId = tempAnim->animRecordId;
@@ -270,7 +270,7 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) {
_anim = newRecord;
MemoryBlock *src = Disk::getReference().getEntry(_anim->animId);
-
+
uint16 numEntries = READ_LE_UINT16(src->data());
uint16 *headerEntry = (uint16 *) (src->data() + 2);
assert((numEntries >= 1) && (numEntries < 100));
@@ -288,7 +288,7 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) {
_numFrames = numEntries;
_frameNumber = 0;
-
+
// Special handling need
if (_hotspotId == RACK_SERF_ID) {
_frameStartsUsed = true;
@@ -303,7 +303,7 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) {
byte *pDest;
headerEntry = (uint16 *) (src->data() + 2);
MemoryBlock &mDest = _frames->data();
- uint16 frameOffset = 0x40;
+ uint16 frameOffset = 0x40;
uint16 *offsetPtr = (uint16 *) src->data();
tempWidth = _width;
@@ -315,9 +315,9 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) {
// For animations with an offset table, set the source pointer
pSrc = dest->data() + frameOffset;
}
-
+
if (_hotspotId == RACK_SERF_ID) {
- // Save the start of each frame for serf, since the size varies
+ // Save the start of each frame for serf, since the size varies
xStart = (frameNumCtr == 0) ? 0 : _frameStarts[frameNumCtr - 1] + tempWidth;
_frameStarts[frameNumCtr] = xStart;
@@ -358,7 +358,7 @@ void Hotspot::setAnimation(HotspotAnimData *newRecord) {
}
}
- if ((newRecord->flags & PIXELFLAG_HAS_TABLE) != 0)
+ if ((newRecord->flags & PIXELFLAG_HAS_TABLE) != 0)
frameOffset += (READ_LE_UINT16(++offsetPtr) >> 1);
}
@@ -391,14 +391,14 @@ void Hotspot::copyTo(Surface *dest) {
r.left += -xPos;
xPos = 0;
}
- else if (xPos >= FULL_SCREEN_WIDTH)
+ else if (xPos >= FULL_SCREEN_WIDTH)
return;
else if (xPos + hWidth > FULL_SCREEN_WIDTH)
r.right = r.left + (FULL_SCREEN_WIDTH - xPos - 1);
// Handle clipping for Y position
if (yPos < 0) {
- if (yPos + hHeight <= MENUBAR_Y_SIZE)
+ if (yPos + hHeight <= MENUBAR_Y_SIZE)
// Completely off screen, so don't display
return;
@@ -420,7 +420,7 @@ void Hotspot::copyTo(Surface *dest) {
void Hotspot::incFrameNumber() {
++_frameNumber;
- if (_frameNumber >= _numFrames)
+ if (_frameNumber >= _numFrames)
_frameNumber = 0;
}
@@ -431,7 +431,7 @@ bool Hotspot::isActiveAnimation() {
uint16 Hotspot::nameId() {
if (_data == NULL)
return 0;
- else
+ else
return _data->nameId;
}
@@ -476,7 +476,7 @@ void Hotspot::setTickProc(uint16 newVal) {
if (_data)
_data->tickProcId = newVal;
- _tickHandler = HotspotTickHandlers::getHandler(newVal);
+ _tickHandler = HotspotTickHandlers::getHandler(newVal);
}
void Hotspot::walkTo(int16 endPosX, int16 endPosY, uint16 destHotspot) {
@@ -557,7 +557,7 @@ void Hotspot::faceHotspot(HotspotData *hotspot) {
} else {
// Visual hotspot
int xp, yp;
-
+
HotspotOverrideData *hsEntry = res.getHotspotOverride(hotspot->hotspotId);
if (hsEntry != NULL) {
xp = x() - hsEntry->xs;
@@ -605,7 +605,7 @@ void Hotspot::setRandomDest() {
currentActions().top().setAction(START_WALKING);
_walkFlag = true;
- // Try up to 20 times to find an unoccupied destination
+ // Try up to 20 times to find an unoccupied destination
for (int tryCtr = 0; tryCtr < 20; ++tryCtr) {
xp = rect.left + rnd.getRandomNumber(rect.right - rect.left);
yp = rect.top + rnd.getRandomNumber(rect.bottom - rect.top);
@@ -613,7 +613,7 @@ void Hotspot::setRandomDest() {
setDestHotspot(0);
// Check if three sequential blocks at chosen destination are unoccupied
- if (!roomData->paths.isOccupied(xp, yp, 3))
+ if (!roomData->paths.isOccupied(xp, yp, 3))
break;
}
}
@@ -729,7 +729,7 @@ void Hotspot::resetPosition() {
setDirection(direction());
}
-void Hotspot::converse(uint16 destCharacterId, uint16 messageId, bool srcStandStill,
+void Hotspot::converse(uint16 destCharacterId, uint16 messageId, bool srcStandStill,
bool destStandStill) {
assert(_data);
_data->talkDestCharacterId = destCharacterId;
@@ -780,7 +780,7 @@ void Hotspot::showMessage(uint16 messageId, uint16 destCharacterId) {
// default response if a specific response not found
- if (idVal == 0xffff) idVal = 0x8c4;
+ if (idVal == 0xffff) idVal = 0x8c4;
debugC(ERROR_DETAILED, kLureDebugStrings, "Hotspot::showMessage idVal=%xh", idVal);
if (idVal == 0x76) {
@@ -802,11 +802,11 @@ void Hotspot::showMessage(uint16 messageId, uint16 destCharacterId) {
StringData::getReference().getString(hotspotData->nameId, nameBuffer);
itemName = nameBuffer;
}
-
+
Dialog::show(idVal, itemName, this->getName());
-
+
} else if (idVal != 0) {
- // Handle message as a talking dialog
+ // Handle message as a talking dialog
converse(destCharacterId, idVal, true, false);
}
}
@@ -836,7 +836,7 @@ void Hotspot::handleTalkDialog() {
destCharacter->setDelayCtr(destCharacter->delayCtr() + 2);
}
}
- return;
+ return;
}
// Time to set up the dialog for the character
@@ -910,7 +910,7 @@ void Hotspot::startTalkDialog() {
if (room.roomNumber() != roomNumber())
return;
- room.setTalkDialog(hotspotId(), _data->talkDestCharacterId, _data->useHotspotId,
+ room.setTalkDialog(hotspotId(), _data->talkDestCharacterId, _data->useHotspotId,
_data->talkMessageId);
}
@@ -924,7 +924,7 @@ static const uint16 validRoomExitHotspots[] = {0x2711, 0x2712, 0x2714, 0x2715, 0
0x2729, 0x272A, 0x272B, 0x272C, 0x272D, 0x272E, 0x272F, 0};
bool Hotspot::isRoomExit(uint16 id) {
- for (const uint16 *p = &validRoomExitHotspots[0]; *p != 0; ++p)
+ for (const uint16 *p = &validRoomExitHotspots[0]; *p != 0; ++p)
if (*p == id) return true;
return false;
}
@@ -952,9 +952,9 @@ HotspotPrecheckResult Hotspot::actionPrecheck(HotspotData *hotspot) {
setActionCtr(0);
showMessage(13, NOONE_ID);
return PC_EXCESS;
- }
+ }
- if ((hotspot->hotspotId >= FIRST_NONCHARACTER_ID) ||
+ if ((hotspot->hotspotId >= FIRST_NONCHARACTER_ID) ||
(hotspot->characterMode == CHARMODE_INTERACTING) ||
(hotspot->characterMode == CHARMODE_WAIT_FOR_PLAYER) ||
(hotspot->characterMode == CHARMODE_WAIT_FOR_INTERACT)) {
@@ -971,7 +971,7 @@ HotspotPrecheckResult Hotspot::actionPrecheck(HotspotData *hotspot) {
setActionCtr(1);
if ((hotspot->hotspotId >= FIRST_NONCHARACTER_ID) ||
- ((hotspot->actionHotspotId != _hotspotId) &&
+ ((hotspot->actionHotspotId != _hotspotId) &&
(hotspot->characterMode == CHARMODE_WAIT_FOR_PLAYER))) {
// loc_880
if (characterWalkingCheck(hotspot->hotspotId))
@@ -986,7 +986,7 @@ HotspotPrecheckResult Hotspot::actionPrecheck(HotspotData *hotspot) {
hotspot->talkGate = GENERAL_MAGIC_ID;
hotspot->talkerId = _hotspotId;
return PC_WAIT;
- }
+ }
}
// loc_888
@@ -996,9 +996,9 @@ HotspotPrecheckResult Hotspot::actionPrecheck(HotspotData *hotspot) {
hotspot->delayCtr = 30;
hotspot->actionHotspotId = _hotspotId;
}
-
+
// If the player had called out to someone to wait, close down that talk dialog
- if ((_hotspotId == PLAYER_ID) && (res.getTalkingCharacter() == PLAYER_ID))
+ if ((_hotspotId == PLAYER_ID) && (res.getTalkingCharacter() == PLAYER_ID))
Room::getReference().setTalkDialog(0, 0, 0, 0);
return PC_EXECUTE;
@@ -1009,10 +1009,10 @@ BarPlaceResult Hotspot::getBarPlace() {
BarEntry &barEntry = res.barmanLists().getDetails(roomNumber());
if (actionCtr() != 0) {
- // Already at bar
+ // Already at bar
// Find the character's slot in the bar entry list
for (int index = 0; index < NUM_SERVE_CUSTOMERS; ++index) {
- if (barEntry.customers[index].hotspotId == hotspotId())
+ if (barEntry.customers[index].hotspotId == hotspotId())
return ((barEntry.customers[index].serveFlags & 0x80) == 0) ? BP_GOT_THERE : BP_KEEP_TRYING;
}
@@ -1027,14 +1027,14 @@ BarPlaceResult Hotspot::getBarPlace() {
// First scan for any existing entry for the character
int index = -1;
while (++index < NUM_SERVE_CUSTOMERS) {
- if (barEntry.customers[index].hotspotId == hotspotId())
+ if (barEntry.customers[index].hotspotId == hotspotId())
break;
}
if (index == NUM_SERVE_CUSTOMERS) {
// Not already present - so scan for an empty slot
index = -1;
while (++index < NUM_SERVE_CUSTOMERS) {
- if (barEntry.customers[index].hotspotId == 0)
+ if (barEntry.customers[index].hotspotId == 0)
break;
}
@@ -1057,12 +1057,12 @@ bool Hotspot::findClearBarPlace() {
// Check if character has reached the bar
Resources &res = Resources::getReference();
BarEntry &barEntry = res.barmanLists().getDetails(roomNumber());
- if ((y() + heightCopy()) < ((barEntry.gridLine << 3) + 24))
+ if ((y() + heightCopy()) < ((barEntry.gridLine << 3) + 24))
return true;
RoomPathsData &paths = res.getRoom(roomNumber())->paths;
-
- // Scan backwards from the right side for 4 free blocks along the bar line block
+
+ // Scan backwards from the right side for 4 free blocks along the bar line block
int numFree = 0;
for (int xp = ROOM_PATHS_WIDTH - 1; xp >= 0; --xp) {
if (paths.isOccupied(xp, barEntry.gridLine))
@@ -1083,7 +1083,7 @@ bool Hotspot::characterWalkingCheck(uint16 id) {
bool altFlag;
HotspotData *hotspot;
- // Note that several invalid hotspot Ids are used to identify special walk to
+ // Note that several invalid hotspot Ids are used to identify special walk to
// coordinates used throughout the game
_walkFlag = true;
@@ -1124,7 +1124,7 @@ bool Hotspot::characterWalkingCheck(uint16 id) {
if (altFlag) {
// Alternate walking check
- if (((x() >> 3) != (xp >> 3)) ||
+ if (((x() >> 3) != (xp >> 3)) ||
((((y() + heightCopy()) >> 3) - 1) != (yp >> 3))) {
// Walk to the specified destination
walkTo(xp, yp);
@@ -1152,7 +1152,7 @@ bool Hotspot::doorCloseCheck(uint16 doorId) {
return true;
}
- Rect bounds(doorHotspot->x(), doorHotspot->y() + doorHotspot->heightCopy()
+ Rect bounds(doorHotspot->x(), doorHotspot->y() + doorHotspot->heightCopy()
- doorHotspot->yCorrection() - doorHotspot->charRectY(),
doorHotspot->x() + doorHotspot->widthCopy(),
doorHotspot->y() + doorHotspot->heightCopy() + doorHotspot->charRectY());
@@ -1165,14 +1165,14 @@ bool Hotspot::doorCloseCheck(uint16 doorId) {
// Skip entry if it's the door or the character
if ((hsCurrent->hotspotId() == hotspotId()) ||
- (hsCurrent->hotspotId() == doorHotspot->hotspotId()))
+ (hsCurrent->hotspotId() == doorHotspot->hotspotId()))
continue;
// Skip entry if it doesn't meet certain criteria
if ((hsCurrent->layer() == 0) ||
(hsCurrent->roomNumber() != doorHotspot->roomNumber()) ||
(hsCurrent->hotspotId() < PLAYER_ID) ||
- ((hsCurrent->hotspotId() >= 0x408) && (hsCurrent->hotspotId() < 0x2710)))
+ ((hsCurrent->hotspotId() >= 0x408) && (hsCurrent->hotspotId() < 0x2710)))
continue;
// Also skip entry if special Id
@@ -1238,7 +1238,7 @@ void Hotspot::doAction() {
void Hotspot::doAction(Action action, HotspotData *hotspot) {
StringList &stringList = Resources::getReference().stringList();
- debugC(ERROR_INTERMEDIATE, kLureDebugHotspots, "Action charId=%xh Action=%d/%s",
+ debugC(ERROR_INTERMEDIATE, kLureDebugHotspots, "Action charId=%xh Action=%d/%s",
_hotspotId, (int)action, (action > EXAMINE) ? NULL : stringList.getString((int)action));
// Set the ACTIVE_HOTSPOT_ID and USE_HOTSPOT_ID fields
@@ -1246,58 +1246,58 @@ void Hotspot::doAction(Action action, HotspotData *hotspot) {
ValueTableData &fields = Resources::getReference().fieldList();
fields.setField(ACTIVE_HOTSPOT_ID, hotspot->hotspotId);
- if (action == USE)
+ if (action == USE)
fields.setField(USE_HOTSPOT_ID, currentActions().top().supportData().param(0));
- else if ((action == GIVE) || (action == ASK))
+ else if ((action == GIVE) || (action == ASK))
fields.setField(USE_HOTSPOT_ID, currentActions().top().supportData().param(1));
- else
+ else
fields.setField(USE_HOTSPOT_ID, hotspot->hotspotId);
}
ActionProcPtr actionProcList[NPC_JUMP_ADDRESS + 1] = {
- &Hotspot::doNothing,
- &Hotspot::doGet,
- NULL,
- &Hotspot::doOperate,
- &Hotspot::doOperate,
- &Hotspot::doOperate,
- &Hotspot::doOpen,
+ &Hotspot::doNothing,
+ &Hotspot::doGet,
+ NULL,
+ &Hotspot::doOperate,
+ &Hotspot::doOperate,
+ &Hotspot::doOperate,
+ &Hotspot::doOpen,
&Hotspot::doClose,
- &Hotspot::doLockUnlock,
- &Hotspot::doLockUnlock,
- &Hotspot::doUse,
- &Hotspot::doGive,
- &Hotspot::doTalkTo,
- &Hotspot::doTell,
+ &Hotspot::doLockUnlock,
+ &Hotspot::doLockUnlock,
+ &Hotspot::doUse,
+ &Hotspot::doGive,
+ &Hotspot::doTalkTo,
+ &Hotspot::doTell,
+ NULL,
+ &Hotspot::doLook,
+ &Hotspot::doLookAt,
+ &Hotspot::doLookThrough,
+ &Hotspot::doAsk,
NULL,
- &Hotspot::doLook,
- &Hotspot::doLookAt,
- &Hotspot::doLookThrough,
- &Hotspot::doAsk,
- NULL,
&Hotspot::doDrink,
- &Hotspot::doStatus,
- &Hotspot::doGoto,
- &Hotspot::doReturn,
- &Hotspot::doBribe,
- &Hotspot::doExamine,
+ &Hotspot::doStatus,
+ &Hotspot::doGoto,
+ &Hotspot::doReturn,
+ &Hotspot::doBribe,
+ &Hotspot::doExamine,
NULL, NULL,
- &Hotspot::npcSetRoomAndBlockedOffset,
- &Hotspot::npcHeySir,
- &Hotspot::npcExecScript,
- &Hotspot::npcResetPausedList,
+ &Hotspot::npcSetRoomAndBlockedOffset,
+ &Hotspot::npcHeySir,
+ &Hotspot::npcExecScript,
+ &Hotspot::npcResetPausedList,
&Hotspot::npcSetRandomDest,
- &Hotspot::npcWalkingCheck,
+ &Hotspot::npcWalkingCheck,
&Hotspot::npcSetSupportOffset,
&Hotspot::npcSupportOffsetConditional,
- &Hotspot::npcDispatchAction,
- &Hotspot::npcTalkNpcToNpc,
- &Hotspot::npcPause,
+ &Hotspot::npcDispatchAction,
+ &Hotspot::npcTalkNpcToNpc,
+ &Hotspot::npcPause,
&Hotspot::npcStartTalking,
&Hotspot::npcJumpAddress};
(this->*actionProcList[action])(hotspot);
- debugC(ERROR_DETAILED, kLureDebugHotspots, "Action charId=%xh Action=%d/%s Complete",
+ debugC(ERROR_DETAILED, kLureDebugHotspots, "Action charId=%xh Action=%d/%s Complete",
_hotspotId, (int)action, (action > EXAMINE) ? NULL : stringList.getString((int)action));
}
@@ -1311,7 +1311,7 @@ void Hotspot::doNothing(HotspotData *hotspot) {
}
}
- if (hotspotId() == PLAYER_ID)
+ if (hotspotId() == PLAYER_ID)
Room::getReference().setCursorState(CS_NONE);
}
@@ -1332,8 +1332,8 @@ void Hotspot::doGet(HotspotData *hotspot) {
if (sequenceOffset >= 0x8000) {
showMessage(sequenceOffset);
return;
- }
-
+ }
+
if (sequenceOffset != 0) {
uint16 execResult = Script::execute(sequenceOffset);
@@ -1345,7 +1345,7 @@ void Hotspot::doGet(HotspotData *hotspot) {
}
// Move hotspot into characters's inventory
- hotspot->roomNumber = hotspotId();
+ hotspot->roomNumber = hotspotId();
if (hotspot->hotspotId < START_NONVISUAL_HOTSPOT_ID) {
// Deactive hotspot animation
@@ -1417,7 +1417,7 @@ void Hotspot::doOpen(HotspotData *hotspot) {
if (sequenceOffset == 1) return;
if (sequenceOffset != 0) {
- if (_exitCtr != 0)
+ if (_exitCtr != 0)
_exitCtr = 4;
showMessage(sequenceOffset);
return;
@@ -1525,7 +1525,7 @@ void Hotspot::doUse(HotspotData *hotspot) {
showMessage(17);
} else {
sequenceOffset = Script::execute(sequenceOffset);
- if (sequenceOffset != 0)
+ if (sequenceOffset != 0)
showMessage(sequenceOffset);
}
}
@@ -1553,7 +1553,7 @@ void Hotspot::doGive(HotspotData *hotspot) {
faceHotspot(hotspot);
endAction();
- if ((hotspot->hotspotId != PRISONER_ID) || (usedId != BOTTLE_HOTSPOT_ID))
+ if ((hotspot->hotspotId != PRISONER_ID) || (usedId != BOTTLE_HOTSPOT_ID))
showMessage(7, hotspot->hotspotId);
uint16 sequenceOffset = res.getHotspotAction(hotspot->actionsOffset, GIVE);
@@ -1586,7 +1586,7 @@ void Hotspot::doTalkTo(HotspotData *hotspot) {
fields.setField(ACTIVE_HOTSPOT_ID, hotspot->hotspotId);
fields.setField(USE_HOTSPOT_ID, hotspot->hotspotId);
- if ((hotspot->hotspotId != SKORL_ID) && ((hotspot->roomNumber != 28) ||
+ if ((hotspot->hotspotId != SKORL_ID) && ((hotspot->roomNumber != 28) ||
(hotspot->hotspotId != BLACKSMITH_ID))) {
HotspotPrecheckResult result = actionPrecheck(hotspot);
@@ -1664,7 +1664,7 @@ void Hotspot::doLook(HotspotData *hotspot) {
Dialog::show(Room::getReference().descId());
}
-static const uint16 hotspotLookAtList[] = {0x411, 0x412, 0x41F, 0x420, 0x421, 0x422, 0x426,
+static const uint16 hotspotLookAtList[] = {0x411, 0x412, 0x41F, 0x420, 0x421, 0x422, 0x426,
0x427, 0x428, 0x429, 0x436, 0x437, 0};
void Hotspot::doLookAt(HotspotData *hotspot) {
@@ -1704,7 +1704,7 @@ void Hotspot::doLookAction(HotspotData *hotspot, Action action) {
if (sequenceOffset >= 0x8000) {
showMessage(sequenceOffset);
} else {
- if (sequenceOffset != 0)
+ if (sequenceOffset != 0)
sequenceOffset = Script::execute(sequenceOffset);
if (sequenceOffset == 0) {
@@ -1793,7 +1793,7 @@ void Hotspot::doStatus(HotspotData *hotspot) {
StringList &stringList = res.stringList();
StringData &strings = StringData::getReference();
Room &room = Room::getReference();
-
+
room.update();
endAction();
@@ -1870,7 +1870,7 @@ void Hotspot::doBribe(HotspotData *hotspot) {
endAction();
return;
}
-
+
const uint16 *tempId = &bribe_hotspot_list[0];
uint16 sequenceOffset = 0x14B; // Default sequence offset
while (*tempId != 0) {
@@ -1882,7 +1882,7 @@ void Hotspot::doBribe(HotspotData *hotspot) {
}
++tempId; // Move over entry's sequence offset
}
-
+
faceHotspot(hotspot);
setActionCtr(0);
endAction();
@@ -1909,7 +1909,7 @@ void Hotspot::doExamine(HotspotData *hotspot) {
if (sequenceOffset >= 0x8000) {
showMessage(sequenceOffset);
} else {
- if (sequenceOffset != 0)
+ if (sequenceOffset != 0)
sequenceOffset = Script::execute(sequenceOffset);
if (sequenceOffset == 0) {
@@ -1934,13 +1934,13 @@ void Hotspot::doLockUnlock(HotspotData *hotspot) {
faceHotspot(hotspot);
endAction();
-
+
uint16 sequenceOffset = res.getHotspotAction(hotspot->actionsOffset, action);
if (sequenceOffset >= 0x8000) {
showMessage(sequenceOffset);
} else {
- if (sequenceOffset != 0)
+ if (sequenceOffset != 0)
Script::execute(sequenceOffset);
}
}
@@ -2063,8 +2063,8 @@ void Hotspot::npcDispatchAction(HotspotData *hotspot) {
CharacterScheduleEntry *newEntry = Resources::getReference().
charSchedules().getEntry(entry.param(0), entry.parent());
currentActions().top().setSupportData(newEntry);
-
- HotspotData *hotspotData = (newEntry->numParams() == 0) ? NULL :
+
+ HotspotData *hotspotData = (newEntry->numParams() == 0) ? NULL :
res.getHotspot(newEntry->param((newEntry->action() == USE) ? 1 : 0));
doAction(newEntry->action(), hotspotData);
}
@@ -2085,7 +2085,7 @@ void Hotspot::npcTalkNpcToNpc(HotspotData *hotspot) {
}
// If dest is already talking, keep exiting until they're free
- if (hotspot->talkCountdown != 0)
+ if (hotspot->talkCountdown != 0)
return;
// Handle the source's talk message
@@ -2175,7 +2175,7 @@ uint16 Hotspot::getTalkId(HotspotData *charHotspot) {
// Get offset of talk set to use
headerEntry = res.getTalkHeader(charHotspot->hotspotId);
- // Check whether character is a stranger
+ // Check whether character is a stranger
if ((isEnglish && (charHotspot->nameId == 378)) ||
(!isEnglish && ((charHotspot->nameId == 381) || (charHotspot->nameId == 382))))
// Is a stranger, so force talk Index to be 0 (initial talk)
@@ -2191,19 +2191,19 @@ void Hotspot::startTalk(HotspotData *charHotspot, uint16 id) {
Resources &res = Resources::getReference();
// Set for providing talk listing
- setTickProc(TALK_TICK_PROC_ID);
-
+ setTickProc(TALK_TICK_PROC_ID);
+
// Signal the character that they're being talked to
charHotspot->talkerId = _hotspotId;
charHotspot->talkGate = 0;
charHotspot->talkDestCharacterId = _hotspotId;
_data->talkDestCharacterId = charHotspot->hotspotId;
_data->talkGate = 0;
-
+
// Set the active talk data
res.setTalkStartEntry(0);
res.setTalkData(id);
- if (!res.getTalkData())
+ if (!res.getTalkData())
error("Talk failed - invalid offset: Character=%xh, offset=%xh",
charHotspot->hotspotId, id);
}
@@ -2375,7 +2375,7 @@ void HotspotTickHandlers::defaultHandler(Hotspot &h) {
void HotspotTickHandlers::standardAnimHandler(Hotspot &h) {
Resources &res = Resources::getReference();
- if (h.frameCtr() > 0)
+ if (h.frameCtr() > 0)
h.decrFrameCtr();
else {
if (h.executeScript()) {
@@ -2406,7 +2406,7 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
if (h.currentActions().action() != WALKING) {
char buffer[MAX_DESC_SIZE];
h.currentActions().list(buffer);
- debugC(ERROR_DETAILED, kLureDebugAnimations, "Hotspot standard character p=(%d,%d,%d) bs=%d\n%s",
+ debugC(ERROR_DETAILED, kLureDebugAnimations, "Hotspot standard character p=(%d,%d,%d) bs=%d\n%s",
h.x(), h.y(), h.roomNumber(), h.blockedState(), buffer);
}
@@ -2495,7 +2495,7 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
debugC(ERROR_DETAILED, kLureDebugAnimations, "Hotspot standard character point 5");
if (h.characterMode() != CHARMODE_NONE) {
- debugC(ERROR_DETAILED, kLureDebugAnimations, "char mode = %d, delay ctr = %d",
+ debugC(ERROR_DETAILED, kLureDebugAnimations, "char mode = %d, delay ctr = %d",
h.characterMode(), h.delayCtr());
if (h.characterMode() == CHARMODE_PLAYER_WAIT) {
@@ -2534,10 +2534,10 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
return;
}
- /* interactHotspotId never seems to be set
+ /* interactHotspotId never seems to be set
if ((h.resource()->interactHotspotId != 0) && !player->currentActions().isEmpty()) {
h.setActionCtr(99);
- if (!actions.isEmpty())
+ if (!actions.isEmpty())
actions.top().setAction(DISPATCH_ACTION);
}
*/
@@ -2579,11 +2579,11 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
case START_WALKING:
// Start the player walking to the given destination
-
- debugC(ERROR_DETAILED, kLureDebugAnimations,
+
+ debugC(ERROR_DETAILED, kLureDebugAnimations,
"Hotspot standard character exec start walking => (%d,%d)",
h.destX(), h.destY());
- h.setOccupied(false);
+ h.setOccupied(false);
pathFinder.reset(paths);
h.currentActions().top().setAction(PROCESSING_PATH);
@@ -2593,15 +2593,15 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
// Handle processing pathfinding
debugC(ERROR_DETAILED, kLureDebugAnimations, "Hotspot standard character processing path");
res.pausedList().scan(h);
-
+
pfResult = pathFinder.process();
if (pfResult == PF_UNFINISHED) break;
- debugC(ERROR_DETAILED, kLureDebugAnimations,
+ debugC(ERROR_DETAILED, kLureDebugAnimations,
"pathFinder done: result = %d", pfResult);
// Post-processing checks
- if ((pfResult == PF_OK) ||
+ if ((pfResult == PF_OK) ||
((h.destHotspotId() == 0) && (pfResult == PF_DEST_OCCUPIED))) {
// Standard processing
debugC(ERROR_DETAILED, kLureDebugAnimations, "Standard result handling");
@@ -2629,7 +2629,7 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
h.setCharacterMode(CHARMODE_PAUSED);
h.setDelayCtr(2);
- if (h.currentActions().isEmpty() ||
+ if (h.currentActions().isEmpty() ||
(h.currentActions().top().roomNumber() != h.roomNumber()))
h.setDestHotspot(0xffff);
@@ -2640,8 +2640,8 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
debugC(ERROR_DETAILED, kLureDebugAnimations, "Character is blocked from moving");
CharacterScheduleEntry *newEntry = res.charSchedules().getEntry(RETURN_SUPPORT_ID);
assert(newEntry);
-
- // Increment the blocked state
+
+ // Increment the blocked state
h.setBlockedState((BlockedState) ((int) h.blockedState() + 1));
if (!h.blockedFlag()) {
// Not already handling blocked, so add a new dummy action so that the new
@@ -2655,8 +2655,8 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
entry.setAction(DISPATCH_ACTION);
entry.setSupportData(newEntry);
entry.setRoomNumber(h.roomNumber());
- }
-
+ }
+
// If the top action is now walking, deliberately fall through to the case entry;
// otherwise break out to exit method
if (h.currentActions().isEmpty() || h.currentActions().top().action() != WALKING)
@@ -2665,7 +2665,7 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
case WALKING:
// The character is currently moving
debugC(ERROR_DETAILED, kLureDebugAnimations, "Hotspot standard character walking");
- h.setOccupied(false);
+ h.setOccupied(false);
// If the character is walking to an exit hotspot, make sure it's still open
if ((h.destHotspotId() != 0) && (h.destHotspotId() != 0xffff)) {
@@ -2680,10 +2680,10 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
}
if (res.pausedList().check(h.hotspotId(), numImpinging, impingingList) == 0) {
- if (h.walkingStep())
+ if (h.walkingStep())
// Walking done
h.currentActions().top().setAction(DISPATCH_ACTION);
-
+
if (h.destHotspotId() != 0) {
// Walking to an exit, check for any required room change
if (Support::checkRoomChange(h))
@@ -2699,12 +2699,12 @@ void HotspotTickHandlers::standardCharacterAnimHandler(Hotspot &h) {
void HotspotTickHandlers::voiceBubbleAnimHandler(Hotspot &h) {
Resources &res = Resources::getReference();
- debugC(ERROR_DETAILED, kLureDebugAnimations,
- "Voice Bubble anim handler: char = %xh, ctr = %d, char speaking ctr = %d",
- h.hotspotId(), h.voiceCtr(),
+ debugC(ERROR_DETAILED, kLureDebugAnimations,
+ "Voice Bubble anim handler: char = %xh, ctr = %d, char speaking ctr = %d",
+ h.hotspotId(), h.voiceCtr(),
res.getHotspot(res.getTalkingCharacter())->talkCountdown);
- if (h.voiceCtr() != 0)
+ if (h.voiceCtr() != 0)
h.setVoiceCtr(h.voiceCtr() - 1);
if (h.voiceCtr() != 0) {
@@ -2756,7 +2756,7 @@ void HotspotTickHandlers::roomExitAnimHandler(Hotspot &h) {
RoomExitJoinData *rec = res.getExitJoin(h.hotspotId());
if (!rec) return;
- RoomExitJoinStruct &rs = (rec->hotspots[0].hotspotId == h.hotspotId()) ?
+ RoomExitJoinStruct &rs = (rec->hotspots[0].hotspotId == h.hotspotId()) ?
rec->hotspots[0] : rec->hotspots[1];
if ((rec->blocked != 0) && (rs.currentFrame != rs.destFrame)) {
@@ -2774,7 +2774,7 @@ void HotspotTickHandlers::roomExitAnimHandler(Hotspot &h) {
--rs.currentFrame;
if ((rs.currentFrame == rs.destFrame) && (h.hotspotId() == room.roomNumber())) {
Sound.addSound(rs.openSound);
-
+
// If in the outside village, trash reverb
if (fields.getField(AREA_FLAG) == 1)
Sound.musicInterface_TrashReverb();
@@ -2799,8 +2799,8 @@ void HotspotTickHandlers::playerAnimHandler(Hotspot &h) {
char buffer[MAX_DESC_SIZE];
h.currentActions().list(buffer);
- debugC(ERROR_DETAILED, kLureDebugAnimations,
- "Hotspot player anim handler p=(%d,%d,%d) bs=%d\n%s",
+ debugC(ERROR_DETAILED, kLureDebugAnimations,
+ "Hotspot player anim handler p=(%d,%d,%d) bs=%d\n%s",
h.x(), h.y(), h.roomNumber(), h.blockedState(), buffer);
h.handleTalkDialog();
@@ -2816,12 +2816,12 @@ void HotspotTickHandlers::playerAnimHandler(Hotspot &h) {
if (h.skipFlag()) {
debugC(ERROR_DETAILED, kLureDebugAnimations, "Skip flag set: numImpinging = %d", numImpinging);
- if (numImpinging > 0)
+ if (numImpinging > 0)
return;
h.setSkipFlag(false);
}
- /* interactHotspotId never seems to be set
+ /* interactHotspotId never seems to be set
if (h.resource()->interactHotspotId != 0) {
h.resource()->interactHotspotId = 0;
Hotspot *hotspot = res.getActiveHotspot(h.resource()->interactHotspotId);
@@ -2894,7 +2894,7 @@ void HotspotTickHandlers::playerAnimHandler(Hotspot &h) {
if (actions.top().supportData().numParams() > 0) {
hotspotId = actions.top().supportData().param((hsAction == USE) ? 1 : 0);
hotspot = res.getHotspot(hotspotId);
- }
+ }
} else {
hsAction = NONE;
}
@@ -2912,7 +2912,7 @@ void HotspotTickHandlers::playerAnimHandler(Hotspot &h) {
case START_WALKING:
// Start the player walking to the given destination
- h.setOccupied(false);
+ h.setOccupied(false);
// Reset the path finder / walking sequence
pathFinder.reset(paths);
@@ -2929,14 +2929,14 @@ void HotspotTickHandlers::playerAnimHandler(Hotspot &h) {
pfResult = pathFinder.process();
if (pfResult == PF_UNFINISHED) break;
- // Pathfinding is now complete
+ // Pathfinding is now complete
pathFinder.list(buffer);
- debugC(ERROR_DETAILED, kLureDebugAnimations,
- "Pathfind processing done; result=%d, walkFlag=%d\n%s",
+ debugC(ERROR_DETAILED, kLureDebugAnimations,
+ "Pathfind processing done; result=%d, walkFlag=%d\n%s",
pfResult, h.walkFlag(), buffer);
- if ((pfResult != PF_OK) && (h.walkFlag() || (pfResult != PF_DEST_OCCUPIED))) {
-
+ if ((pfResult != PF_OK) && (h.walkFlag() || (pfResult != PF_DEST_OCCUPIED))) {
+
debugC(ERROR_DETAILED, kLureDebugAnimations, "Blocked state checking");
if (h.blockedState() == BS_FINAL) {
res.pausedList().reset(h.hotspotId());
@@ -2968,7 +2968,7 @@ void HotspotTickHandlers::playerAnimHandler(Hotspot &h) {
h.currentActions().top().setAction(WALKING);
if (mouse.getCursorNum() != CURSOR_CAMERA)
mouse.setCursorNum(CURSOR_ARROW);
-
+
// Deliberate fall through to walking
case WALKING:
@@ -3020,14 +3020,14 @@ void HotspotTickHandlers::followerAnimHandler(Hotspot &h) {
if ((h.resource()->tickProcId == FOLLOWER_TICK_PROC_2) || (fields.getField(37) == 0)) {
if (h.currentActions().isEmpty() && (h.roomNumber() != player->roomNumber())) {
// Character in different room than player
- if (h.hotspotId() == GOEWIN_ID)
+ if (h.hotspotId() == GOEWIN_ID)
h.currentActions().addFront(DISPATCH_ACTION, player->roomNumber());
else {
// Scan through the translation list for an alternate destination room
const RoomTranslationRecord *p = &roomTranslations[0];
while ((p->srcRoom != 0) && (p->srcRoom != player->roomNumber()))
++p;
- h.currentActions().addFront(DISPATCH_ACTION,
+ h.currentActions().addFront(DISPATCH_ACTION,
(p->srcRoom != 0) ? p->destRoom : player->roomNumber());
}
}
@@ -3074,7 +3074,7 @@ void HotspotTickHandlers::followerAnimHandler(Hotspot &h) {
standardCharacterAnimHandler(h);
return;
}
-
+
// Flag the action as having been done, so it won't be repeated
set->setDone(actionIndex);
}
@@ -3124,7 +3124,7 @@ void HotspotTickHandlers::sonicRatAnimHandler(Hotspot &h) {
}
void HotspotTickHandlers::droppingTorchAnimHandler(Hotspot &h) {
- if (h.frameCtr() > 0)
+ if (h.frameCtr() > 0)
h.setFrameCtr(h.frameCtr() - 1);
else {
bool result = h.executeScript();
@@ -3135,7 +3135,7 @@ void HotspotTickHandlers::droppingTorchAnimHandler(Hotspot &h) {
res.activateHotspot(0x41C);
// Add sound
- Sound.addSound(8);
+ Sound.addSound(8);
// Enable the fire and activate its animation
HotspotData *fire = res.getHotspot(0x418);
@@ -3291,7 +3291,7 @@ void HotspotTickHandlers::morkusAnimHandler(Hotspot &h) {
Common::RandomSource rnd;
g_system->getEventManager()->registerRandomSource(rnd, "lureHotspots");
- h.setHotspotScript(rnd.getRandomNumber(100) >= 50 ? 0x54 : 0);
+ h.setHotspotScript(rnd.getRandomNumber(100) >= 50 ? 0x54 : 0);
h.setFrameCtr(20 + rnd.getRandomNumber(63));
}
}
@@ -3309,7 +3309,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
Mouse &mouse = Mouse::getReference();
TalkSelections &talkSelections = res.getTalkSelections();
TalkData *data = res.getTalkData();
- TalkEntryList &entries = data->entries;
+ TalkEntryList &entries = data->entries;
Hotspot *charHotspot;
char buffer[MAX_DESC_SIZE];
Rect r;
@@ -3337,7 +3337,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
// Reset talk entry pointer list
for (lineNum = 0; lineNum < MAX_TALK_SELECTIONS; ++lineNum)
talkSelections[lineNum] = NULL;
-
+
// Loop through list to find entries to display
_talkResponse = NULL;
numLines = 0;
@@ -3350,14 +3350,14 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
for (; i != entries.end(); ++i) {
entry = *i;
uint8 flags = (uint8) (entry->descId >> 14);
- if (flags == 3)
+ if (flags == 3)
// Skip the entry
continue;
uint16 sequenceOffset = entry->preSequenceId & 0x3fff;
bool showLine = sequenceOffset == 0;
if (!showLine) {
- debugC(ERROR_DETAILED, kLureDebugAnimations,
+ debugC(ERROR_DETAILED, kLureDebugAnimations,
"Checking whether to display line: script=%xh, descId=%d",
sequenceOffset, entry->descId);
showLine = Script::execute(sequenceOffset) != 0;
@@ -3386,7 +3386,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
case TALK_SELECT:
r.left = 0; r.right = FULL_SCREEN_WIDTH - 1;
selectedLine = mouse.y() / MENUBAR_Y_SIZE;
- if ((selectedLine > MAX_TALK_SELECTIONS) || ((selectedLine != 0) &&
+ if ((selectedLine > MAX_TALK_SELECTIONS) || ((selectedLine != 0) &&
!talkSelections[selectedLine-1]))
selectedLine = 0;
@@ -3411,7 +3411,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
if (mouse.mButton() || mouse.rButton()) {
// Abort the conversation
talkEndConversation();
-
+
// Have destination character show question speech bubble
charHotspot = res.getActiveHotspot(talkDestCharacter);
if (charHotspot != NULL)
@@ -3454,7 +3454,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
case TALK_RESPOND_2:
// Wait until the question dialog is no longer active
h.handleTalkDialog();
- debugC(ERROR_DETAILED, kLureDebugAnimations, "Player talk dialog countdown %d",
+ debugC(ERROR_DETAILED, kLureDebugAnimations, "Player talk dialog countdown %d",
h.resource()->talkCountdown);
if (res.getTalkingCharacter() != 0)
@@ -3493,7 +3493,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
if (charHotspot != NULL)
charHotspot->converse(PLAYER_ID, descId, true);
- }
+ }
res.setTalkState(TALK_RESPONSE_WAIT);
break;
@@ -3503,7 +3503,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
charHotspot = res.getActiveHotspot(talkDestCharacter);
assert(charHotspot);
- debugC(ERROR_DETAILED, kLureDebugAnimations, "Player talk dialog countdown %d",
+ debugC(ERROR_DETAILED, kLureDebugAnimations, "Player talk dialog countdown %d",
(charHotspot) ? charHotspot->resource()->talkCountdown : 0);
if ((charHotspot->resource()->talkCountdown > 0) || (res.getTalkingCharacter() != 0))
@@ -3515,7 +3515,7 @@ void HotspotTickHandlers::talkAnimHandler(Hotspot &h) {
if (result == 0xffff)
keepTalkingFlag = false;
else {
- if ((result & 0x8000) == 0)
+ if ((result & 0x8000) == 0)
keepTalkingFlag = true;
else {
result = Script::execute(result & 0x7fff);
@@ -3596,7 +3596,7 @@ void HotspotTickHandlers::barmanAnimHandler(Hotspot &h) {
h.setDelayCtr(h.delayCtr() - 1);
return;
}
-
+
if (h.frameCtr() == 0) {
// Barman not currently doing something
if (barEntry.currentCustomer != NULL) {
@@ -3632,7 +3632,7 @@ void HotspotTickHandlers::barmanAnimHandler(Hotspot &h) {
h.setFrameCtr(2);
}
}
-
+
return;
}
}
@@ -3703,7 +3703,7 @@ void HotspotTickHandlers::barmanAnimHandler(Hotspot &h) {
if (h.hotspotId() == EWAN_ID)
xp = rnd.getRandomNumber(51) + 94;
else
- xp = rnd.getRandomNumber(85) + 117;
+ xp = rnd.getRandomNumber(85) + 117;
h.setSupportValue(xp);
h.setFrameCtr(0x83);
@@ -3761,7 +3761,7 @@ void HotspotTickHandlers::barmanAnimHandler(Hotspot &h) {
// Make sure Ewan is back to his standard animation
h.setWidth(16);
h.setAnimationIndex(EWAN_ANIM_INDEX);
-
+
if (ewanXOffset) {
h.setPosition(h.x() + 8, h.y());
ewanXOffset = false;
@@ -3823,7 +3823,7 @@ void HotspotTickHandlers::goewinShopAnimHandler(Hotspot &h) {
if ((talkIndex == 12) || (talkIndex == 13) || (talkIndex == 14) ||
(playerHotspot->roomNumber() == 34))
h.setDelayCtr(1500);
- else
+ else
Script::normalGoewin(0, 0, 0);
}
}
@@ -3846,7 +3846,7 @@ void HotspotTickHandlers::skullAnimHandler(Hotspot &h) {
}
void HotspotTickHandlers::dragonFireAnimHandler(Hotspot &h) {
- if (h.executeScript())
+ if (h.executeScript())
// Script is finished - player is dead
Game::getReference().setState(GS_RESTORE_RESTART);
}
@@ -3943,7 +3943,7 @@ void HotspotTickHandlers::npcRoomChange(Hotspot &h) {
h.currentActions().top().setRoomNumber(h.roomNumber());
} else if ((h.blockedOffset() != 0) && (h.blockedOffset() != 0xffff)) {
- // Only current action on stack - and there is a block handler
+ // Only current action on stack - and there is a block handler
CharacterScheduleEntry *entry = res.charSchedules().getEntry(h.blockedOffset());
h.currentActions().top().setSupportData(entry);
h.currentActions().top().setRoomNumber(h.roomNumber());
@@ -3964,7 +3964,7 @@ void HotspotTickHandlers::npcRoomChange(Hotspot &h) {
for (i = list.begin(); i != list.end(); ++i) {
if ((h.roomNumber() == (exitData.roomNumber & 0xff)) && (h.layer() != 0) &&
- (h.hotspotId() >= PLAYER_ID) && (h.hotspotId() < FIRST_NONCHARACTER_ID))
+ (h.hotspotId() >= PLAYER_ID) && (h.hotspotId() < FIRST_NONCHARACTER_ID))
++numCharacters;
}
@@ -3972,7 +3972,7 @@ void HotspotTickHandlers::npcRoomChange(Hotspot &h) {
uint16 dataId = res.getCharOffset(0);
CharacterScheduleEntry *entry = res.charSchedules().getEntry(dataId);
h.currentActions().addFront(DISPATCH_ACTION, entry, h.roomNumber());
-
+
return;
}
}
@@ -3992,7 +3992,7 @@ void HotspotTickHandlers::npcRoomChange(Hotspot &h) {
}
// No exit hotspot, or it has one that's not blocked. So start the walking
- h.currentActions().top().setAction(START_WALKING);
+ h.currentActions().top().setAction(START_WALKING);
h.setWalkFlag(true);
}
@@ -4021,11 +4021,11 @@ int WalkingActionEntry::numSteps() {
// PathFinder class
-PathFinder::PathFinder(Hotspot *h) {
+PathFinder::PathFinder(Hotspot *h) {
_hotspot = h;
_inUse = false;
- _list.clear();
- _stepCtr = 0;
+ _list.clear();
+ _stepCtr = 0;
}
void PathFinder::clear() {
@@ -4068,9 +4068,9 @@ PathFinderResult PathFinder::process() {
_xDestCurrent >>= 3; _yDestCurrent >>= 3;
if ((_xCurrent == _xDestCurrent) && (_yCurrent == _yDestCurrent)) {
// Very close move
- if (_xDestPos > 0)
+ if (_xDestPos > 0)
add(RIGHT, _xDestPos);
- else if (_xDestPos < 0)
+ else if (_xDestPos < 0)
add(LEFT, -_xDestPos);
_inProgress = false;
@@ -4091,7 +4091,7 @@ PathFinderResult PathFinder::process() {
result = _destOccupied ? PF_DEST_OCCUPIED : PF_OK;
*_pDest = 0;
- // Set up the current pointer, adjusting away from edges if necessary
+ // Set up the current pointer, adjusting away from edges if necessary
if (_xCurrent >= _xDestCurrent) {
_xChangeInc = -1;
@@ -4161,7 +4161,7 @@ PathFinderResult PathFinder::process() {
scanLine(_destX, -1, pTemp, v);
scanLine(ROOM_PATHS_WIDTH - _destX, 1, pTemp, v);
scanLine(_destY, -DECODED_PATHS_WIDTH, pTemp, v);
- scanLine(ROOM_PATHS_HEIGHT - _destY, DECODED_PATHS_WIDTH, pTemp, v);
+ scanLine(ROOM_PATHS_HEIGHT - _destY, DECODED_PATHS_WIDTH, pTemp, v);
if (pTemp == _pDest) {
clear();
@@ -4177,7 +4177,7 @@ PathFinderResult PathFinder::process() {
Room::getReference().tempLayer[ctr] = _layer[ctr];
}
- // Determine the walk path by working backwards from the destination, adding in the
+ // Determine the walk path by working backwards from the destination, adding in the
// walking steps in reverse order until source is reached
int stageCtr;
for (stageCtr = 0; stageCtr < 3; ++stageCtr) {
@@ -4192,7 +4192,7 @@ PathFinderResult PathFinder::process() {
while (1) {
v = *pCurrent - 1;
if (v == 0) break;
-
+
newDirection = NO_DIRECTION;
if (!altFlag && (currDirection != LEFT) && (currDirection != RIGHT)) {
// Standard order direction checking
@@ -4207,7 +4207,7 @@ PathFinderResult PathFinder::process() {
else if (*(pCurrent - DECODED_PATHS_WIDTH) == v) newDirection = DOWN;
else if (*(pCurrent + DECODED_PATHS_WIDTH) == v) newDirection = UP;
}
- if (newDirection == NO_DIRECTION)
+ if (newDirection == NO_DIRECTION)
error("Path finding process failed");
// Process for the specified direction
@@ -4239,7 +4239,7 @@ PathFinderResult PathFinder::process() {
currDirection = newDirection;
}
- if (stageCtr == 0)
+ if (stageCtr == 0)
// Save the number of steps needed
savedSteps = numSteps;
if ((stageCtr == 1) && (numSteps <= savedSteps))
@@ -4250,12 +4250,12 @@ PathFinderResult PathFinder::process() {
// Add a final move if necessary
if (result == PF_OK) {
- if (_xDestPos < 0)
+ if (_xDestPos < 0)
addBack(LEFT, -_xDestPos);
- else if (_xDestPos > 0)
+ else if (_xDestPos > 0)
addBack(RIGHT, _xDestPos);
}
-
+
final_step:
if (_xPos < 0) add(RIGHT, -_xPos);
else if (_xPos > 0) add(LEFT, _xPos);
@@ -4271,7 +4271,7 @@ void PathFinder::list(char *buffer) {
else {
printf("Pathfinder::list\n");
}
-
+
ManagedList<WalkingActionEntry *>::iterator i;
for (i = _list.begin(); i != _list.end(); ++i) {
WalkingActionEntry *e = *i;
@@ -4429,7 +4429,7 @@ void PathFinder::loadFromStream(Common::ReadStream *stream) {
/* */
/*-------------------------------------------------------------------------*/
-// finds a list of character animations whose base area are impinging
+// finds a list of character animations whose base area are impinging
// that of the specified character (ie. are bumping into them)
int Support::findIntersectingCharacters(Hotspot &h, uint16 *charList) {
@@ -4446,10 +4446,10 @@ int Support::findIntersectingCharacters(Hotspot &h, uint16 *charList) {
HotspotList::iterator i;
for (i = res.activeHotspots().begin(); i != res.activeHotspots().end(); ++i) {
Hotspot &hotspot = **i;
-
+
// Check for basic reasons to skip checking the animation
if ((h.hotspotId() == hotspot.hotspotId()) || (hotspot.layer() == 0) ||
- (h.roomNumber() != hotspot.roomNumber()) ||
+ (h.roomNumber() != hotspot.roomNumber()) ||
(hotspot.hotspotId() >= FIRST_NONCHARACTER_ID) ||
hotspot.skipFlag()) continue;
// TODO: See why si+ANIM_HOTSPOT_OFFSET compared aganst di+ANIM_VOICE_CTR
@@ -4491,7 +4491,7 @@ bool Support::checkRoomChange(Hotspot &h) {
if (exitRec->sequenceOffset != 0xffff) {
Script::execute(exitRec->sequenceOffset);
} else {
- Support::characterChangeRoom(h, exitRec->roomNumber,
+ Support::characterChangeRoom(h, exitRec->roomNumber,
exitRec->x, exitRec->y, exitRec->direction);
}
}
@@ -4499,7 +4499,7 @@ bool Support::checkRoomChange(Hotspot &h) {
return (exitRec != NULL);
}
-void Support::characterChangeRoom(Hotspot &h, uint16 roomNumber,
+void Support::characterChangeRoom(Hotspot &h, uint16 roomNumber,
int16 newX, int16 newY, Direction dir) {
Resources &res = Resources::getReference();
Room &room = Room::getReference();
@@ -4554,12 +4554,12 @@ bool Support::charactersIntersecting(HotspotData *hotspot1, HotspotData *hotspot
(hotspot2->startX + hotspot2->widthCopy + 4 < hotspot1->startX) ||
(hotspot2->startY + hotspot2->heightCopy - hotspot2->yCorrection - 2 >=
hotspot1->startY + hotspot1->heightCopy + 2) ||
- (hotspot2->startY + hotspot2->heightCopy + 2 <
+ (hotspot2->startY + hotspot2->heightCopy + 2 <
hotspot1->startY + hotspot1->heightCopy - hotspot1->yCorrection - 2));
}
bool Support::isCharacterInList(uint16 *lst, int numEntries, uint16 charId) {
- while (numEntries-- > 0)
+ while (numEntries-- > 0)
if (*lst++ == charId) return true;
return false;
}
diff --git a/engines/lure/hotspots.h b/engines/lure/hotspots.h
index d07939c368..fcbaae1a13 100644
--- a/engines/lure/hotspots.h
+++ b/engines/lure/hotspots.h
@@ -41,10 +41,10 @@ class Support {
private:
static bool changeRoomCheckBumped(Hotspot &h);
public:
- static int findIntersectingCharacters(Hotspot &h, uint16 *charList);
+ static int findIntersectingCharacters(Hotspot &h, uint16 *charList);
static bool checkForIntersectingCharacter(Hotspot &h);
static bool checkRoomChange(Hotspot &h);
- static void characterChangeRoom(Hotspot &h, uint16 roomNumber,
+ static void characterChangeRoom(Hotspot &h, uint16 roomNumber,
int16 newX, int16 newY, Direction dir);
static bool charactersIntersecting(HotspotData *hotspot1, HotspotData *hotspot2);
static bool isCharacterInList(uint16 *lst, int numEntries, uint16 charId);
@@ -133,11 +133,11 @@ private:
void processCell(uint16 *p);
void scanLine(int numScans, int changeAmount, uint16 *&pEnd, int &v);
- void add(Direction dir, int steps) {
- _list.push_front(new WalkingActionEntry(dir, steps));
+ void add(Direction dir, int steps) {
+ _list.push_front(new WalkingActionEntry(dir, steps));
}
- void addBack(Direction dir, int steps) {
- _list.push_back(new WalkingActionEntry(dir, steps));
+ void addBack(Direction dir, int steps) {
+ _list.push_back(new WalkingActionEntry(dir, steps));
}
public:
PathFinder(Hotspot *h);
@@ -209,8 +209,8 @@ private:
uint8 _exitCtr;
bool _walkFlag;
uint16 _startRoomNumber;
- uint16 _supportValue;
-
+ uint16 _supportValue;
+
// Support methods
uint16 getTalkId(HotspotData *charHotspot);
void startTalk(HotspotData *charHotspot, uint16 id);
@@ -245,19 +245,19 @@ private:
void doBribe(HotspotData *hotspot);
void doExamine(HotspotData *hotspot);
void npcSetRoomAndBlockedOffset(HotspotData *hotspot);
- void npcHeySir(HotspotData *hotspot);
- void npcExecScript(HotspotData *hotspot);
- void npcResetPausedList(HotspotData *hotspot);
+ void npcHeySir(HotspotData *hotspot);
+ void npcExecScript(HotspotData *hotspot);
+ void npcResetPausedList(HotspotData *hotspot);
void npcSetRandomDest(HotspotData *hotspot);
- void npcWalkingCheck(HotspotData *hotspot);
- void npcSetSupportOffset(HotspotData *hotspot);
+ void npcWalkingCheck(HotspotData *hotspot);
+ void npcSetSupportOffset(HotspotData *hotspot);
void npcSupportOffsetConditional(HotspotData *hotspot);
- void npcDispatchAction(HotspotData *hotspot);
- void npcTalkNpcToNpc(HotspotData *hotspot);
- void npcPause(HotspotData *hotspot);
+ void npcDispatchAction(HotspotData *hotspot);
+ void npcTalkNpcToNpc(HotspotData *hotspot);
+ void npcPause(HotspotData *hotspot);
void npcStartTalking(HotspotData *hotspot);
void npcJumpAddress(HotspotData *hotspot);
-
+
// Auxillaries
void doLookAction(HotspotData *hotspot, Action action);
public:
@@ -276,9 +276,9 @@ public:
HotspotData *resource() { return _data; }
uint16 numFrames() { return _numFrames; }
uint16 frameNumber() { return _frameNumber; }
- void setFrameNumber(uint16 frameNum) {
+ void setFrameNumber(uint16 frameNum) {
assert(frameNum < _numFrames);
- _frameNumber = frameNum;
+ _frameNumber = frameNum;
}
void incFrameNumber();
Direction direction() { return _direction; }
@@ -301,9 +301,9 @@ public:
uint16 yCorrection() { return _yCorrection; }
uint16 charRectY() { return _charRectY; }
uint16 roomNumber() { return _roomNumber; }
- uint16 talkScript() {
+ uint16 talkScript() {
assert(_data);
- return _data->talkScriptOffset;
+ return _data->talkScriptOffset;
}
uint16 hotspotScript() { return _hotspotScriptOffset; }
uint8 layer() { return _layer; }
@@ -313,8 +313,8 @@ public:
void setPersistant(bool value) { _persistant = value; }
uint8 colourOffset() { return _colourOffset; }
void setColourOffset(uint8 value) { _colourOffset = value; }
- void setRoomNumber(uint16 roomNum) {
- _roomNumber = roomNum;
+ void setRoomNumber(uint16 roomNum) {
+ _roomNumber = roomNum;
if (_data) _data->roomNumber = roomNum;
}
uint16 nameId();
@@ -324,13 +324,13 @@ public:
void setDestPosition(int16 newX, int16 newY) { _destX = newX; _destY = newY; }
void setDestHotspot(uint16 id) { _destHotspotId = id; }
void setExitCtr(uint8 value) { _exitCtr = value; }
- BlockedState blockedState() {
+ BlockedState blockedState() {
assert(_data);
- return _data->blockedState;
+ return _data->blockedState;
}
- void setBlockedState(BlockedState newState) {
+ void setBlockedState(BlockedState newState) {
assert(_data);
- _data->blockedState = newState;
+ _data->blockedState = newState;
}
bool blockedFlag() {
assert(_data);
@@ -347,20 +347,20 @@ public:
_width = newWidth;
_frameWidth = newWidth;
}
- void setHeight(uint16 newHeight) {
+ void setHeight(uint16 newHeight) {
_height = newHeight;
}
void setHotspotScript(uint16 offset) {
assert(_data != NULL);
_hotspotScriptOffset = offset;
- _data->hotspotScriptOffset = offset;
+ _data->hotspotScriptOffset = offset;
}
void setLayer(uint8 newLayer) {
assert(_data != NULL);
_layer = newLayer;
_data->layer = newLayer;
}
- void setActions(uint32 newActions) {
+ void setActions(uint32 newActions) {
assert(_data);
_data->actions = newActions;
}
@@ -374,33 +374,33 @@ public:
assert(_data != NULL);
_data->characterMode = value;
}
- uint16 delayCtr() {
+ uint16 delayCtr() {
assert(_data);
- return _data->delayCtr;
+ return _data->delayCtr;
}
- void setDelayCtr(uint16 value) {
+ void setDelayCtr(uint16 value) {
assert(_data);
- _data->delayCtr = value;
+ _data->delayCtr = value;
}
- uint16 pauseCtr() {
+ uint16 pauseCtr() {
assert(_data);
return _data->pauseCtr;
}
- void setPauseCtr(uint16 value) {
+ void setPauseCtr(uint16 value) {
assert(_data);
_data->pauseCtr = value;
}
- VariantBool coveredFlag() {
+ VariantBool coveredFlag() {
assert(_data);
return _data->coveredFlag;
}
- void setCoveredFlag(VariantBool value) {
+ void setCoveredFlag(VariantBool value) {
assert(_data);
_data->coveredFlag = value;
}
- uint16 useHotspotId() {
+ uint16 useHotspotId() {
assert(_data);
- return _data->useHotspotId;
+ return _data->useHotspotId;
}
void setUseHotspotId(uint16 value) {
assert(_data);
@@ -438,29 +438,29 @@ public:
void doAction();
void doAction(Action action, HotspotData *hotspot);
- CurrentActionStack &currentActions() {
+ CurrentActionStack &currentActions() {
assert(_data);
- return _data->npcSchedule;
+ return _data->npcSchedule;
}
PathFinder &pathFinder() { return _pathFinder; }
DestStructure &tempDest() { return _tempDest; }
uint16 frameCtr() { return _frameCtr; }
void setFrameCtr(uint16 value) { _frameCtr = value; }
void decrFrameCtr() { if (_frameCtr > 0) --_frameCtr; }
- uint8 actionCtr() {
+ uint8 actionCtr() {
assert(_data);
- return _data->actionCtr;
+ return _data->actionCtr;
}
- void setActionCtr(uint8 v) {
+ void setActionCtr(uint8 v) {
assert(_data);
- _data->actionCtr = v;
+ _data->actionCtr = v;
}
uint8 voiceCtr() { return _voiceCtr; }
void setVoiceCtr(uint8 v) { _voiceCtr = v; }
// Miscellaneous
void doNothing(HotspotData *hotspot);
- void converse(uint16 destCharacterId, uint16 messageId, bool srcStandStill = false,
+ void converse(uint16 destCharacterId, uint16 messageId, bool srcStandStill = false,
bool destStandStill = false);
void showMessage(uint16 messageId, uint16 destCharacterId = NOONE_ID);
void scheduleConverse(uint16 destHotspot, uint16 messageId);
diff --git a/engines/lure/intro.cpp b/engines/lure/intro.cpp
index 2dd657e4b8..4d3e172dc5 100644
--- a/engines/lure/intro.cpp
+++ b/engines/lure/intro.cpp
@@ -60,10 +60,10 @@ bool Introduction::showScreen(uint16 screenId, uint16 paletteId, uint16 delaySiz
screen.screen().loadScreen(screenId);
screen.update();
Palette p(paletteId);
-
+
if (isEGA) screen.setPalette(&p);
else screen.paletteFadeIn(&p);
-
+
bool result = interruptableDelay(delaySize);
if (events.quitFlag) return true;
@@ -81,7 +81,7 @@ bool Introduction::interruptableDelay(uint32 milliseconds) {
Events &events = Events::getReference();
if (events.interruptableDelay(milliseconds)) {
- if (events.type() == Common::EVENT_KEYDOWN)
+ if (events.type() == Common::EVENT_KEYDOWN)
return events.event().kbd.keycode == 27;
else if (events.type() == Common::EVENT_LBUTTONDOWN)
return false;
@@ -101,8 +101,8 @@ bool Introduction::show() {
// Initial game company and then game screen
for (int ctr = 0; start_screens[ctr]; ++ctr)
- if (showScreen(start_screens[ctr], start_screens[ctr] + 1, 5000))
- return true;
+ if (showScreen(start_screens[ctr], start_screens[ctr] + 1, 5000))
+ return true;
PaletteCollection coll(0x32);
Palette EgaPalette(0x1D);
@@ -116,19 +116,19 @@ bool Introduction::show() {
for (; curr_anim->resourceId; ++curr_anim) {
// Handle sound selection
if (curr_anim->soundNumber != 0xff) {
- if (currentSound != 0xff)
+ if (currentSound != 0xff)
// Stop the previous sound
Sound.musicInterface_KillAll();
-
+
currentSound = curr_anim->soundNumber;
Sound.musicInterface_Play(currentSound, 0);
}
bool fadeIn = curr_anim == anim_screens;
- anim = new AnimationSequence(curr_anim->resourceId,
- isEGA ? EgaPalette : coll.getPalette(curr_anim->paletteIndex), fadeIn,
+ anim = new AnimationSequence(curr_anim->resourceId,
+ isEGA ? EgaPalette : coll.getPalette(curr_anim->paletteIndex), fadeIn,
(curr_anim->resourceId == 0x44) ? 4 : 7);
- if (curr_anim->initialPause != 0)
+ if (curr_anim->initialPause != 0)
if (interruptableDelay(curr_anim->initialPause * 1000 / 50)) return true;
result = false;
@@ -149,7 +149,7 @@ bool Introduction::show() {
delete anim;
if (result) {
- Sound.musicInterface_KillAll();
+ Sound.musicInterface_KillAll();
return true;
}
}
@@ -165,7 +165,7 @@ bool Introduction::show() {
if (result) break;
} while (anim->step());
delete anim;
-
+
if (!result) {
// Show final introduction animation
if (!isEGA)
diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp
index 5ea6ed63dc..a798116ff7 100644
--- a/engines/lure/lure.cpp
+++ b/engines/lure/lure.cpp
@@ -67,9 +67,9 @@ int LureEngine::init() {
// Check the version of the lure.dat file
Common::File f;
VersionStructure version;
- if (!f.open(SUPPORT_FILENAME))
+ if (!f.open(SUPPORT_FILENAME))
GUIError("Could not locate Lure support file");
-
+
f.seek(0xbf * 8);
f.read(&version, sizeof(VersionStructure));
f.close();
@@ -78,7 +78,7 @@ int LureEngine::init() {
GUIError("Error validating %s - file is invalid or out of date", SUPPORT_FILENAME);
else if ((version.vMajor != LURE_DAT_MAJOR) || (version.vMinor != LURE_DAT_MINOR))
GUIError("Incorrect version of %s file - expected %d.%d but got %d.%d",
- SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
+ SUPPORT_FILENAME, LURE_DAT_MAJOR, LURE_DAT_MINOR,
version.vMajor, version.vMinor);
_disk = new Disk();
@@ -164,7 +164,7 @@ const char *LureEngine::generateSaveName(int slotNumber) {
bool LureEngine::saveGame(uint8 slotNumber, Common::String &caption) {
Common::WriteStream *f = this->_saveFileMan->openForSaving(
generateSaveName(slotNumber));
- if (f == NULL)
+ if (f == NULL)
return false;
f->write("lure", 5);
@@ -188,7 +188,7 @@ bool LureEngine::saveGame(uint8 slotNumber, Common::String &caption) {
bool LureEngine::loadGame(uint8 slotNumber) {
Common::ReadStream *f = this->_saveFileMan->openForLoading(
generateSaveName(slotNumber));
- if (f == NULL)
+ if (f == NULL)
return false;
// Check for header
@@ -230,7 +230,7 @@ void LureEngine::GUIError(const char *msg, ...) {
// Generate the full error message
va_start(va, msg);
vsnprintf(buffer, STRINGBUFLEN, msg, va);
- va_end(va);
+ va_end(va);
Engine::GUIErrorMessage(buffer);
exit(1);
diff --git a/engines/lure/lure.h b/engines/lure/lure.h
index 576e85f725..b4a131ed62 100644
--- a/engines/lure/lure.h
+++ b/engines/lure/lure.h
@@ -65,7 +65,7 @@ public:
LureEngine(OSystem *system, const LureGameDescription *gameDesc);
~LureEngine();
static LureEngine &getReference();
-
+
virtual int init();
virtual int go();
void quitGame();
diff --git a/engines/lure/luredefs.h b/engines/lure/luredefs.h
index 5940c1ea41..603102a099 100644
--- a/engines/lure/luredefs.h
+++ b/engines/lure/luredefs.h
@@ -123,7 +123,7 @@ enum Action {
// Palette colour increment amouns for palette fade in/outs
#define PALETTE_FADE_INC_SIZE 4
-// EGA constants
+// EGA constants
#define EGA_PALETTE_SIZE 16
#define EGA_NUM_LAYERS 4
#define EGA_PIXELS_PER_BYTE 8
diff --git a/engines/lure/menu.cpp b/engines/lure/menu.cpp
index 40eae20693..9e5f0e6f23 100644
--- a/engines/lure/menu.cpp
+++ b/engines/lure/menu.cpp
@@ -45,7 +45,7 @@ MenuRecord::MenuRecord(const MenuRecordBounds *bounds, int numParams, ...) {
va_list params;
_numEntries = numParams;
- _entries = (const char **) malloc(sizeof(const char *) * _numEntries);
+ _entries = (const char **) malloc(sizeof(const char *) * _numEntries);
va_start(params, numParams);
for (int index = 0; index < _numEntries; ++index)
@@ -86,13 +86,13 @@ Menu::Menu() {
delete data;
const MenuRecordLanguage *rec = &menuList[0];
- while ((rec->language != UNK_LANG) && (rec->language != language))
+ while ((rec->language != UNK_LANG) && (rec->language != language))
++rec;
if (rec->language == UNK_LANG)
error("Unknown language encountered in top line handler");
_menus[0] = new MenuRecord(&rec->menus[0], 1, sl.getString(S_CREDITS));
- _menus[1] = new MenuRecord(&rec->menus[1], 3,
+ _menus[1] = new MenuRecord(&rec->menus[1], 3,
sl.getString(S_RESTART_GAME), sl.getString(S_SAVE_GAME), sl.getString(S_RESTORE_GAME));
_menus[2] = new MenuRecord(&rec->menus[2], 3,
sl.getString(S_QUIT), sl.getString(S_SLOW_TEXT), sl.getString(S_SOUND_ON));
@@ -116,7 +116,7 @@ uint8 Menu::execute() {
Screen &screen = Screen::getReference();
mouse.setCursorNum(CURSOR_ARROW);
- system.copyRectToScreen(_menu->data(), FULL_SCREEN_WIDTH, 0, 0,
+ system.copyRectToScreen(_menu->data(), FULL_SCREEN_WIDTH, 0, 0,
FULL_SCREEN_WIDTH, MENUBAR_Y_SIZE);
_selectedMenu = NULL;
@@ -138,7 +138,7 @@ uint8 Menu::execute() {
delete _surfaceMenu;
_surfaceMenu = NULL;
_selectedIndex = 0;
- }
+ }
_selectedMenu = p;
@@ -146,12 +146,12 @@ uint8 Menu::execute() {
if (_selectedMenu) {
toggleHighlight(_selectedMenu);
_surfaceMenu = Surface::newDialog(
- _selectedMenu->width(), _selectedMenu->numEntries(),
+ _selectedMenu->width(), _selectedMenu->numEntries(),
_selectedMenu->entries(), false, DEFAULT_TEXT_COLOUR, false);
_surfaceMenu->copyToScreen(_selectedMenu->xstart(), MENUBAR_Y_SIZE);
}
- system.copyRectToScreen(_menu->data(), FULL_SCREEN_WIDTH, 0, 0,
+ system.copyRectToScreen(_menu->data(), FULL_SCREEN_WIDTH, 0, 0,
FULL_SCREEN_WIDTH, MENUBAR_Y_SIZE);
}
}
@@ -172,12 +172,12 @@ uint8 Menu::execute() {
if (_surfaceMenu) delete _surfaceMenu;
// Deselect the currently selected menu header
- if (_selectedMenu)
+ if (_selectedMenu)
toggleHighlight(_selectedMenu);
// Restore the previous screen
screen.update();
-
+
if ((_selectedMenu == NULL) || (_selectedIndex == 0)) return MENUITEM_NONE;
else if (_selectedMenu == _menus[0])
return MENUITEM_CREDITS;
@@ -201,11 +201,11 @@ uint8 Menu::execute() {
}
}
return MENUITEM_NONE;
-}
+}
MenuRecord *Menu::getMenuAt(int x) {
for (int ctr = 0; ctr < NUM_MENUS; ++ctr)
- if ((x >= _menus[ctr]->hsxstart()) && (x <= _menus[ctr]->hsxend()))
+ if ((x >= _menus[ctr]->hsxstart()) && (x <= _menus[ctr]->hsxend()))
return _menus[ctr];
return NULL;
@@ -244,7 +244,7 @@ void Menu::toggleHighlightItem(uint8 index) {
const byte colourList[4] = {EGA_DIALOG_TEXT_COLOUR, EGA_DIALOG_WHITE_COLOUR,
VGA_DIALOG_TEXT_COLOUR, VGA_DIALOG_WHITE_COLOUR};
const byte *colours = LureEngine::getReference().isEGA() ? &colourList[0] : &colourList[2];
- byte *p = _surfaceMenu->data().data() + (Surface::textY() +
+ byte *p = _surfaceMenu->data().data() + (Surface::textY() +
((index - 1) * FONT_HEIGHT)) * _surfaceMenu->width() + Surface::textX();
int numBytes =_surfaceMenu->width() - Surface::textX() * 2;
@@ -280,7 +280,7 @@ uint16 PopupMenu::ShowInventory() {
strings.getString(hotspot->nameId, hotspotName);
}
}
-
+
uint16 result = Show(numItems, const_cast<const char **>(itemNames));
if (result != 0xffff) result = idList[result];
@@ -336,16 +336,16 @@ uint16 PopupMenu::ShowItems(Action contextAction, uint16 roomNumber) {
for (ih = hotspots.begin(); ih != hotspots.end(); ++ih) {
HotspotData *hotspot = *ih;
- if ((hotspot->headerFlags != 15) &&
+ if ((hotspot->headerFlags != 15) &&
((hotspot->headerFlags & fields.hdrFlagMask()) == 0))
continue;
if (((hotspot->flags & HOTSPOTFLAG_MENU_EXCLUSION) != 0) || ((hotspot->flags & HOTSPOTFLAG_FOUND) == 0))
- // Skip the current hotspot
+ // Skip the current hotspot
continue;
// If the hotspot is room specific, skip if the character will not be in the specified room
- if (((hotspot->flags & HOTSPOTFLAG_ROOM_SPECIFIC) != 0) &&
+ if (((hotspot->flags & HOTSPOTFLAG_ROOM_SPECIFIC) != 0) &&
(hotspot->roomNumber != roomNumber))
continue;
@@ -374,7 +374,7 @@ uint16 PopupMenu::ShowItems(Action contextAction, uint16 roomNumber) {
++numItems;
}
- if (numItems == 0)
+ if (numItems == 0)
// No items, so add a 'nothing' to the statusLine
strcat(room.statusLine(), "(nothing)");
@@ -454,7 +454,7 @@ Action PopupMenu::Show(int numEntries, Action *actions) {
for (int index = 0; index < numEntries; ++index)
strList[index] = stringList.getString(*actionPtr++);
uint16 result = Show(numEntries, strList);
-
+
delete strList;
if (result == 0xffff) return NONE;
else return actions[result];
@@ -524,7 +524,7 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) {
#endif
if ((actionIndex >= 0) && (actionIndex < numEntries)) {
s->writeString(Surface::textX(), Surface::textY() + index * FONT_HEIGHT,
- actions[actionIndex], true,
+ actions[actionIndex], true,
#ifndef LURE_CLICKABLE_MENUS
(index == (numLines / 2)) ? whiteColour : textColour,
#else
@@ -562,7 +562,7 @@ uint16 PopupMenu::Show(int numEntries, const char *actions[]) {
if (((keycode == Common::KEYCODE_KP8) || (keycode == Common::KEYCODE_UP)) && (selectedIndex > 0)) {
--selectedIndex;
refreshFlag = true;
- } else if (((keycode == Common::KEYCODE_KP2) || (keycode == Common::KEYCODE_DOWN)) &&
+ } else if (((keycode == Common::KEYCODE_KP2) || (keycode == Common::KEYCODE_DOWN)) &&
(selectedIndex < numEntries-1)) {
++selectedIndex;
refreshFlag = true;
diff --git a/engines/lure/module.mk b/engines/lure/module.mk
index e508684344..6b8bf35b77 100644
--- a/engines/lure/module.mk
+++ b/engines/lure/module.mk
@@ -29,6 +29,6 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/lure/palette.cpp b/engines/lure/palette.cpp
index 48bfb60db7..03161032c0 100644
--- a/engines/lure/palette.cpp
+++ b/engines/lure/palette.cpp
@@ -46,7 +46,7 @@ Palette::Palette(uint16 srcNumEntries, const byte *srcData, PaletteSource palett
_palette = Memory::allocate(_numEntries * 4);
if (srcData) {
- if (paletteSource == RGB64)
+ if (paletteSource == RGB64)
convertRgb64Palette(srcData, _numEntries);
else if (paletteSource == EGA) {
assert((srcNumEntries == 16) || (srcNumEntries == 17));
@@ -74,7 +74,7 @@ Palette::Palette(Palette &src) {
Palette::Palette(uint16 resourceId, PaletteSource paletteSource) {
Disk &disk = Disk::getReference();
bool isEGA = LureEngine::getReference().isEGA();
- MemoryBlock *srcData = disk.getEntry(resourceId);
+ MemoryBlock *srcData = disk.getEntry(resourceId);
if (paletteSource == DEFAULT)
paletteSource = isEGA ? EGA : RGB64;
@@ -84,7 +84,7 @@ Palette::Palette(uint16 resourceId, PaletteSource paletteSource) {
// Handle EGA palette
if ((srcData->size() != 16) && (srcData->size() != 17))
error("Specified resource %d is not a palette", resourceId);
-
+
_numEntries = 16;
_palette = Memory::allocate(_numEntries * 4);
convertEGAPalette(srcData->data());
@@ -159,7 +159,7 @@ uint32 Palette::getEntry(uint8 index) {
return *entry;
}
-void Palette::copyFrom(Palette *src) {
+void Palette::copyFrom(Palette *src) {
_palette->copyFrom(src->palette());
}
diff --git a/engines/lure/palette.h b/engines/lure/palette.h
index bf8b8e50e2..1481e22775 100644
--- a/engines/lure/palette.h
+++ b/engines/lure/palette.h
@@ -52,7 +52,7 @@ public:
uint16 numEntries() { return _palette->size() / 4; }
void setEntry(uint8 index, uint32 value);
uint32 getEntry(uint8 index);
- void copyFrom(Palette *src);
+ void copyFrom(Palette *src);
};
class PaletteCollection {
diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp
index a957fcf22f..ec8d95676c 100644
--- a/engines/lure/res.cpp
+++ b/engines/lure/res.cpp
@@ -116,7 +116,7 @@ void Resources::reloadData() {
// Get the palette subset data
_paletteSubset = isEGA ? NULL : new Palette(ALT_PALETTE_RESOURCE_ID);
- // Load room data
+ // Load room data
mb = d.getEntry(ROOM_DATA_RESOURCE_ID);
paths = d.getEntry(ROOM_PATHS_RESOURCE_ID);
@@ -150,11 +150,11 @@ void Resources::reloadData() {
for (;;) {
offsetVal = READ_LE_UINT16(mb->data() + (ctr * 2));
if (offsetVal == 0xffff) break;
-
+
if (offsetVal != 0) {
RoomData *room = getRoom(ctr);
if (room) {
- RoomExitHotspotResource *re = (RoomExitHotspotResource *)
+ RoomExitHotspotResource *re = (RoomExitHotspotResource *)
(mb->data() + offsetVal);
while (READ_LE_UINT16(&re->hotspotId) != 0xffff) {
RoomExitHotspotData *newEntry = new RoomExitHotspotData(re);
@@ -187,7 +187,7 @@ void Resources::reloadData() {
while (READ_LE_UINT16(offset++) != 0xffff) ++numCharOffsets;
_charOffsets = new uint16[numCharOffsets];
offset = (uint16 *) mb->data();
- for (ctr = 0; ctr < numCharOffsets; ++ctr, ++offset)
+ for (ctr = 0; ctr < numCharOffsets; ++ctr, ++offset)
_charOffsets[ctr] = READ_LE_UINT16(offset);
// Next load up the list of random actions your follower can do in each room
@@ -262,7 +262,7 @@ void Resources::reloadData() {
mb = d.getEntry(HOTSPOT_SCRIPT_LIST_RESOURCE_ID);
uint16 numEntries = mb->size() / 2;
uint16 *srcVal = (uint16 *) mb->data();
- uint16 *destVal = _hotspotScriptData = (uint16 *)
+ uint16 *destVal = _hotspotScriptData = (uint16 *)
Memory::alloc(numEntries * sizeof(uint16));
for (ctr = 0; ctr < numEntries; ++ctr, ++srcVal, ++destVal) {
*destVal = READ_LE_UINT16(srcVal);
@@ -298,7 +298,7 @@ void Resources::reloadData() {
// Read in the talk data entries
mb = d.getEntry(TALK_DATA_RESOURCE_ID);
-
+
// First get the list of give talk Ids
v = (uint16 *) mb->data();
@@ -334,7 +334,7 @@ void Resources::reloadData() {
// Load in the list of room exit coordinates
mb = d.getEntry(EXIT_COORDINATES_RESOURCE_ID);
- RoomExitCoordinateEntryResource *coordRec = (RoomExitCoordinateEntryResource *) mb->data();
+ RoomExitCoordinateEntryResource *coordRec = (RoomExitCoordinateEntryResource *) mb->data();
while (READ_LE_UINT16(coordRec) != 0xffff) {
RoomExitCoordinates *newEntry = new RoomExitCoordinates(coordRec);
_coordinateList.push_back(newEntry);
@@ -371,7 +371,7 @@ void Resources::reloadData() {
RoomExitJoinData *Resources::getExitJoin(uint16 hotspotId) {
RoomExitJoinList::iterator i;
-
+
for (i = _exitJoins.begin(); i != _exitJoins.end(); ++i) {
RoomExitJoinData *rec = *i;
if ((rec->hotspots[0].hotspotId == hotspotId) || (rec->hotspots[1].hotspotId == hotspotId))
@@ -400,7 +400,7 @@ RoomData *Resources::getRoom(uint16 roomNumber) {
bool Resources::checkHotspotExtent(HotspotData *hotspot) {
uint16 roomNum = hotspot->roomNumber;
RoomData *room = getRoom(roomNum);
- return (hotspot->startX >= room->clippingXStart) && ((room->clippingXEnd == 0) ||
+ return (hotspot->startX >= room->clippingXStart) && ((room->clippingXEnd == 0) ||
(hotspot->startX + 32 < room->clippingXEnd));
}
@@ -409,7 +409,7 @@ void Resources::insertPaletteSubset(Palette &p) {
p.palette()->copyFrom(_paletteSubset->palette(), 60*4, 220*4, 8*4);
}
-byte *Resources::getCursor(uint8 cursorNum) {
+byte *Resources::getCursor(uint8 cursorNum) {
if (!LureEngine::getReference().isEGA())
return _cursors->data() + (cursorNum * CURSOR_SIZE);
@@ -503,7 +503,7 @@ int Resources::getAnimationIndex(HotspotAnimData *animData) {
uint16 Resources::getHotspotAction(uint16 actionsOffset, Action action) {
HotspotActionList *list = _actionsList.getActions(actionsOffset);
uint16 offset = (!list) ? 0 : list->getActionOffset(action);
- debugC(ERROR_DETAILED, kLureDebugHotspots,
+ debugC(ERROR_DETAILED, kLureDebugHotspots,
"Resources::getHotspotAction actionsOffset=%xh result=%xh", actionsOffset, offset);
return offset;
}
@@ -530,12 +530,12 @@ void Resources::setTalkingCharacter(uint16 id) {
assert(charHotspot);
charHotspot->talkDestCharacterId = 0;
- if (_talkingCharacter != id)
+ if (_talkingCharacter != id)
charHotspot->talkCountdown = 0;
}
- _talkingCharacter = id;
-
+ _talkingCharacter = id;
+
if (_talkingCharacter != 0) {
Hotspot *character = getActiveHotspot(id);
assert(character);
@@ -591,7 +591,7 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
loadFlag = false;
else
// Make the notice be on-screen
- res->startY = 85;
+ res->startY = 85;
break;
case 6:
@@ -612,7 +612,7 @@ Hotspot *Resources::activateHotspot(uint16 hotspotId) {
// Special post-load handling
if (res->loadOffset == 3) hotspot->setPersistant(true);
if (res->loadOffset == 5) hotspot->handleTalkDialog();
-
+
// TODO: Figure out why there's a room set in the animation decode for a range of characters,
// particularly since it doesn't seem to match what happens in-game
/*
@@ -639,7 +639,7 @@ Hotspot *Resources::addHotspot(uint16 hotspotId) {
Hotspot *hotspot = new Hotspot(hData);
_activeHotspots.push_back(hotspot);
- if (hotspotId < FIRST_NONCHARACTER_ID) {
+ if (hotspotId < FIRST_NONCHARACTER_ID) {
// Default characters to facing upwards until they start moving
hotspot->setDirection(UP);
hotspot->setCharRectY(0);
@@ -662,7 +662,7 @@ void Resources::deactivateHotspot(uint16 hotspotId, bool isDestId) {
_activeHotspots.erase(i);
break;
}
-
+
i++;
}
}
@@ -676,7 +676,7 @@ void Resources::deactivateHotspot(Hotspot *hotspot) {
_activeHotspots.erase(i);
break;
}
-
+
i++;
}
}
@@ -794,7 +794,7 @@ void Resources::loadFromStream(Common::ReadStream *stream) {
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading walkable paths");
_roomData.loadFromStream(stream);
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading delay list");
- _delayList.loadFromStream(stream);
+ _delayList.loadFromStream(stream);
if (saveVersion >= 32) {
debugC(ERROR_DETAILED, kLureDebugScripts, "Loading talk data");
diff --git a/engines/lure/res.h b/engines/lure/res.h
index ac0430e32d..8e54135868 100644
--- a/engines/lure/res.h
+++ b/engines/lure/res.h
@@ -135,12 +135,12 @@ public:
PausedCharacterList &pausedList() { return _pausedList; }
BarmanLists &barmanLists() { return _barmanLists; }
StringList &stringList() { return _stringList; }
- uint16 getCharOffset(int index) {
- if (index >= numCharOffsets)
+ uint16 getCharOffset(int index) {
+ if (index >= numCharOffsets)
error("Invalid index %d passed to script engine support data offset list", index);
if (index == 1)
error("support data list index #1 was referenced - special handlng TODO");
- return _charOffsets[index];
+ return _charOffsets[index];
}
void copyCursorTo(Surface *s, uint8 cursorNum, int16 x, int16 y);
@@ -149,7 +149,7 @@ public:
TalkData *getTalkData() { return _activeTalkData; }
void setTalkState(TalkState state) { _talkState = state; }
TalkState getTalkState() { return _talkState; }
- TalkSelections &getTalkSelections() { return _talkSelections; }
+ TalkSelections &getTalkSelections() { return _talkSelections; }
TalkDialogDetails &getTalkDetails() { return _talkDetails; }
void setTalkSelection(int index) { _talkSelection = index; }
int getTalkSelection() { return _talkSelection; }
@@ -164,8 +164,8 @@ public:
}
void setCurrentAction(Action action) { _currentAction = action; }
Action getCurrentAction() { return _currentAction; }
- const char *getCurrentActionStr() {
- if (_currentAction > EXAMINE)
+ const char *getCurrentActionStr() {
+ if (_currentAction > EXAMINE)
error("Invalid current action %d", _currentAction);
return _stringList.getString(_currentAction);
}
diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp
index db2207445c..8ce8a14f69 100644
--- a/engines/lure/res_struct.cpp
+++ b/engines/lure/res_struct.cpp
@@ -32,7 +32,7 @@
namespace Lure {
-extern const int actionNumParams[NPC_JUMP_ADDRESS+1] = {0,
+extern const int actionNumParams[NPC_JUMP_ADDRESS+1] = {0,
1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 0, 1,
0, 1, 1, 1, 1, 0, 0, 2, 1, 1, 0, 0, 1, 1, 2, 2, 5, 2, 2, 1};
@@ -64,19 +64,19 @@ static const uint16 ewanExtraGraphic2[] = {
static const BarEntry default_barList[3] = {
{29, SID_ID, {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, {&basicPolish[0], &sidsFetch[0], NULL, NULL}, 13, NULL},
{32, NELLIE_ID, {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, {&nelliesScratch[0], &nelliesFetch[0], NULL, NULL}, 14, NULL},
- {35, EWAN_ID, {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, {&ewansFetch[0], &ewansFetch[0],
+ {35, EWAN_ID, {{0, 0}, {0, 0}, {0, 0}, {0, 0}}, {&ewansFetch[0], &ewansFetch[0],
&ewanExtraGraphic1[0], &ewanExtraGraphic2[0]}, 16, NULL}
};
extern const RoomTranslationRecord roomTranslations[] = {
- {0x1E, 0x13}, {0x07, 0x08}, {0x1C, 0x12}, {0x26, 0x0F},
- {0x27, 0x0F}, {0x28, 0x0F}, {0x29, 0x0F}, {0x22, 0x0A},
+ {0x1E, 0x13}, {0x07, 0x08}, {0x1C, 0x12}, {0x26, 0x0F},
+ {0x27, 0x0F}, {0x28, 0x0F}, {0x29, 0x0F}, {0x22, 0x0A},
{0x23, 0x13}, {0x24, 0x14}, {0x31, 0x2C}, {0x2F, 0x2C},
{0, 0}};
// Room data holding class
-RoomData::RoomData(RoomResource *rec, MemoryBlock *pathData) {
+RoomData::RoomData(RoomResource *rec, MemoryBlock *pathData) {
roomNumber = READ_LE_UINT16(&rec->roomNumber);
hdrFlags = rec->hdrFlags;
@@ -116,7 +116,7 @@ RoomExitHotspotData::RoomExitHotspotData(RoomExitHotspotResource *rec) {
// Room exit class
RoomExitData::RoomExitData(RoomExitResource *rec) {
- xs = READ_LE_INT16(&rec->xs);
+ xs = READ_LE_INT16(&rec->xs);
ys = READ_LE_INT16(&rec->ys);
xe = READ_LE_INT16(&rec->xe);
ye = READ_LE_INT16(&rec->ye);
@@ -126,16 +126,16 @@ RoomExitData::RoomExitData(RoomExitResource *rec) {
y = READ_LE_INT16(&rec->newRoomY);
switch (rec->direction) {
- case 0x80:
+ case 0x80:
direction = UP;
break;
- case 0x40:
+ case 0x40:
direction = DOWN;
break;
- case 0x20:
+ case 0x20:
direction = LEFT;
break;
- case 0x10:
+ case 0x10:
direction = RIGHT;
break;
default:
@@ -235,7 +235,7 @@ void RoomPathsData::decompress(RoomPathsDecompressedData &dataOut, int character
for (int x = 0; x < (ROOM_PATHS_WIDTH / 8); ++x) {
// Get next byte, which containing bits for 8 blocks
- v = *pIn--;
+ v = *pIn--;
for (int bitCtr = 0; bitCtr < 8; ++bitCtr) {
bool isSet = (v & 1) != 0;
@@ -243,7 +243,7 @@ void RoomPathsData::decompress(RoomPathsDecompressedData &dataOut, int character
if (charState) {
// Handling occupied characters adjusted for character width
- if (isSet)
+ if (isSet)
// Reset character counter
charCtr = charWidth;
@@ -345,7 +345,7 @@ void RoomExitJoinList::loadFromStream(ReadStream *stream) {
if (hotspot1Id == 0xffff) error("Invalid room exit join list");
uint16 hotspot2Id = stream->readUint16LE();
- if ((rec->hotspots[0].hotspotId != hotspot1Id) ||
+ if ((rec->hotspots[0].hotspotId != hotspot1Id) ||
(rec->hotspots[1].hotspotId != hotspot2Id))
break;
@@ -578,7 +578,7 @@ MovementData::MovementData(MovementResource *rec) {
// List of movement frames
-bool MovementDataList::getFrame(uint16 currentFrame, int16 &xChange,
+bool MovementDataList::getFrame(uint16 currentFrame, int16 &xChange,
int16 &yChange, uint16 &nextFrame) {
if (empty()) return false;
bool foundFlag = false;
@@ -619,8 +619,8 @@ HotspotActionList::HotspotActionList(uint16 id, byte *data) {
data += 2;
HotspotActionResource *actionRec = (HotspotActionResource *) data;
-
- for (int actionCtr = 0; actionCtr < numItems; ++actionCtr,
+
+ for (int actionCtr = 0; actionCtr < numItems; ++actionCtr,
GET_NEXT(actionRec, HotspotActionResource)) {
HotspotActionData *actionEntry = new HotspotActionData(actionRec);
@@ -662,8 +662,8 @@ TalkHeaderData::~TalkHeaderData() {
}
uint16 TalkHeaderData::getEntry(int index) {
- if (index >= _numEntries)
- error("Invalid talk index %d specified for hotspot %xh",
+ if (index >= _numEntries)
+ error("Invalid talk index %d specified for hotspot %xh",
_numEntries, characterId);
return _data[index];
}
@@ -692,7 +692,7 @@ TalkEntryData *TalkData::getResponse(int index) {
TalkEntryList::iterator i = responses.begin();
int v = index;
while (v-- > 0) {
- if (i == responses.end())
+ if (i == responses.end())
error("Invalid talk response index %d specified", index);
++i;
}
@@ -707,7 +707,7 @@ void TalkDataList::saveToStream(WriteStream *stream) {
for (i = begin(); i != end(); ++i) {
TalkData *rec = *i;
TalkEntryList::iterator i2;
-
+
for (i2 = rec->entries.begin(); i2 != rec->entries.end(); ++i2) {
TalkEntryData *entry = *i2;
stream->writeUint16LE(entry->descId);
@@ -720,7 +720,7 @@ void TalkDataList::loadFromStream(ReadStream *stream) {
for (i = begin(); i != end(); ++i) {
TalkData *rec = *i;
TalkEntryList::iterator i2;
-
+
for (i2 = rec->entries.begin(); i2 != rec->entries.end(); ++i2) {
TalkEntryData *entry = *i2;
entry->descId = stream->readUint16LE();
@@ -742,13 +742,13 @@ RoomExitCoordinates::RoomExitCoordinates(RoomExitCoordinateEntryResource *rec) {
_entries[ctr].hotspotIndexId = (tempY >> 12) << 4;
}
- for (ctr = 0; ctr < ROOM_EXIT_COORDINATES_NUM_ROOMS; ++ctr)
+ for (ctr = 0; ctr < ROOM_EXIT_COORDINATES_NUM_ROOMS; ++ctr)
_roomIndex[ctr] = rec->roomIndex[ctr];
}
RoomExitCoordinates &RoomExitCoordinatesList::getEntry(uint16 roomNumber) {
RoomExitCoordinatesList::iterator i = begin();
- while (--roomNumber > 0)
+ while (--roomNumber > 0)
++i;
return **i;
}
@@ -822,7 +822,7 @@ void SequenceDelayList::saveToStream(WriteStream *stream) {
for (i = begin(); i != end(); ++i) {
SequenceDelayData *entry = *i;
stream->writeUint16LE(entry->sequenceOffset);
- stream->writeUint32LE((currTime > entry->timeoutCtr ) ? 0 :
+ stream->writeUint32LE((currTime > entry->timeoutCtr ) ? 0 :
entry->timeoutCtr - currTime);
stream->writeByte(entry->canClear);
}
@@ -851,14 +851,14 @@ CharacterScheduleEntry::CharacterScheduleEntry(Action theAction, ...) {
va_list u_Arg;
va_start(u_Arg, theAction);
- for (int paramCtr = 0; paramCtr < actionNumParams[_action]; ++paramCtr)
+ for (int paramCtr = 0; paramCtr < actionNumParams[_action]; ++paramCtr)
_params[paramCtr] = (uint16) va_arg(u_Arg, int);
va_end(u_Arg);
_numParams = actionNumParams[_action];
}
-CharacterScheduleEntry::CharacterScheduleEntry(CharacterScheduleSet *parentSet,
+CharacterScheduleEntry::CharacterScheduleEntry(CharacterScheduleSet *parentSet,
CharacterScheduleResource *&rec) {
_parent = parentSet;
@@ -867,10 +867,10 @@ CharacterScheduleEntry::CharacterScheduleEntry(CharacterScheduleSet *parentSet,
_action = (Action) READ_LE_UINT16(&rec->action);
_numParams = actionNumParams[_action];
- for (int index = 0; index < _numParams; ++index)
+ for (int index = 0; index < _numParams; ++index)
_params[index] = READ_LE_UINT16(&rec->params[index]);
- rec = (CharacterScheduleResource *) ((byte *) rec +
+ rec = (CharacterScheduleResource *) ((byte *) rec +
(_numParams + 1) * sizeof(uint16));
}
@@ -894,7 +894,7 @@ void CharacterScheduleEntry::setDetails(Action theAction, ...) {
va_list list;
va_start(list, theAction);
- for (int paramCtr = 0; paramCtr < actionNumParams[_action]; ++paramCtr)
+ for (int paramCtr = 0; paramCtr < actionNumParams[_action]; ++paramCtr)
_params[paramCtr] = (uint16) va_arg(list, int);
va_end(list);
@@ -960,7 +960,7 @@ CharacterScheduleEntry *CharacterScheduleList::getEntry(uint16 id, CharacterSche
--index;
}
- if (i == end())
+ if (i == end())
error("Invalid index %d specified for support data set", id >> 8);
currentSet = *i;
}
@@ -979,12 +979,12 @@ CharacterScheduleEntry *CharacterScheduleList::getEntry(uint16 id, CharacterSche
}
uint16 CharacterScheduleSet::getId(CharacterScheduleEntry *rec) {
- // Return an Id for the entry based on the id of the set combined with the
+ // Return an Id for the entry based on the id of the set combined with the
// index of the specific entry
uint16 result = _id << 10;
iterator i;
- for (i = begin(); i != end(); ++i, ++result)
+ for (i = begin(); i != end(); ++i, ++result)
if (*i == rec) break;
if (i == end())
error("Parent child relationship missing in character schedule set");
@@ -1037,12 +1037,12 @@ void RandomActionSet::loadFromStream(Common::ReadStream *stream) {
void RandomActionList::saveToStream(Common::WriteStream *stream) {
- for (iterator i = begin(); i != end(); ++i)
+ for (iterator i = begin(); i != end(); ++i)
(*i)->saveToStream(stream);
}
void RandomActionList::loadFromStream(Common::ReadStream *stream) {
- for (iterator i = begin(); i != end(); ++i)
+ for (iterator i = begin(); i != end(); ++i)
(*i)->loadFromStream(stream);
}
@@ -1098,13 +1098,13 @@ void PausedCharacterList::countdown() {
--rec->counter;
// Handle reflecting counter to hotspot
- if (rec->destCharId < START_EXIT_ID)
+ if (rec->destCharId < START_EXIT_ID)
rec->charHotspot->pauseCtr = rec->counter + 1;
// If counter has reached zero, remove entry from list
- if (rec->counter == 0)
+ if (rec->counter == 0)
i = erase(i);
- else
+ else
++i;
}
}
@@ -1119,8 +1119,8 @@ void PausedCharacterList::scan(Hotspot &h) {
if (rec->srcCharId == h.hotspotId()) {
rec->counter = IDLE_COUNTDOWN_SIZE;
-
- if (rec->destCharId < START_EXIT_ID)
+
+ if (rec->destCharId < START_EXIT_ID)
rec->charHotspot->pauseCtr = IDLE_COUNTDOWN_SIZE;
}
}
@@ -1138,7 +1138,7 @@ int PausedCharacterList::check(uint16 charId, int numImpinging, uint16 *impingin
Hotspot *hotspot = res.getActiveHotspot(impingingList[index]);
if ((!hotspot) || (!hotspot->currentActions().isEmpty() &&
(hotspot->currentActions().top().action() == EXEC_HOTSPOT_SCRIPT)))
- // Entry is skipped if hotspot not present or is executing hotspot script
+ // Entry is skipped if hotspot not present or is executing hotspot script
continue;
// Scan through the pause list to see if there's a record for the
@@ -1146,7 +1146,7 @@ int PausedCharacterList::check(uint16 charId, int numImpinging, uint16 *impingin
bool foundEntry = false;
for (i = res.pausedList().begin(); !foundEntry && (i != res.pausedList().end()); ++i) {
PausedCharacter *rec = *i;
- foundEntry = (rec->srcCharId == charId) &&
+ foundEntry = (rec->srcCharId == charId) &&
(rec->destCharId == hotspot->hotspotId());
}
@@ -1162,11 +1162,11 @@ int PausedCharacterList::check(uint16 charId, int numImpinging, uint16 *impingin
// Add a new paused character entry
PausedCharacter *entry = new PausedCharacter(charId, hotspot->hotspotId());
res.pausedList().push_back(entry);
- charHotspot->setBlockedState(BS_INITIAL);
+ charHotspot->setBlockedState(BS_INITIAL);
if (hotspot->hotspotId() < START_EXIT_ID) {
- if ((charHotspot->characterMode() == CHARMODE_PAUSED) ||
- ((charHotspot->pauseCtr() == 0) &&
+ if ((charHotspot->characterMode() == CHARMODE_PAUSED) ||
+ ((charHotspot->pauseCtr() == 0) &&
(charHotspot->characterMode() == CHARMODE_NONE))) {
if (hotspot->characterMode() != CHARMODE_WAIT_FOR_INTERACT)
hotspot->resource()->scriptHotspotId = charId;
@@ -1193,7 +1193,7 @@ BarmanLists::BarmanLists() {
}
void BarmanLists::reset() {
- for (int index = 0; index < 3; ++index)
+ for (int index = 0; index < 3; ++index)
_barList[index] = default_barList[index];
}
@@ -1244,7 +1244,7 @@ void StringList::load(MemoryBlock *data) {
for (int index = 0; index < _numEntries; ++index) {
_entries[index] = p;
- p += strlen(p) + 1;
+ p += strlen(p) + 1;
}
}
@@ -1267,7 +1267,7 @@ void ValueTableData::reset() {
_playerNewPos.roomNumber = 0;
_playerNewPos.position.x = 0;
_playerNewPos.position.y = 0;
- _hdrFlagMask = 1;
+ _hdrFlagMask = 1;
for (uint16 index = 0; index < NUM_VALUE_FIELDS; ++index)
_fieldList[index] = 0;
@@ -1309,7 +1309,7 @@ void ValueTableData::saveToStream(Common::WriteStream *stream) {
stream->writeSint16LE(_playerNewPos.position.y);
stream->writeUint16LE(_playerNewPos.roomNumber);
stream->writeByte(_hdrFlagMask);
-
+
// Write out the special fields
for (int index = 0; index < NUM_VALUE_FIELDS; ++index)
stream->writeUint16LE(_fieldList[index]);
@@ -1322,7 +1322,7 @@ void ValueTableData::loadFromStream(Common::ReadStream *stream) {
_playerNewPos.position.y = stream->readSint16LE();
_playerNewPos.roomNumber = stream->readUint16LE();
_hdrFlagMask = stream->readByte();
-
+
// Read in the field list
for (int index = 0; index < NUM_VALUE_FIELDS; ++index)
_fieldList[index] = stream->readUint16LE();
@@ -1333,16 +1333,16 @@ void ValueTableData::loadFromStream(Common::ReadStream *stream) {
// Current action entry class methods
CurrentActionEntry::CurrentActionEntry(CurrentAction newAction, uint16 roomNum) {
- _action = newAction;
- _supportData = NULL;
+ _action = newAction;
+ _supportData = NULL;
_dynamicSupportData = false;
_roomNumber = roomNum;
}
-CurrentActionEntry::CurrentActionEntry(CurrentAction newAction, CharacterScheduleEntry *data, uint16 roomNum) {
+CurrentActionEntry::CurrentActionEntry(CurrentAction newAction, CharacterScheduleEntry *data, uint16 roomNum) {
assert(data->parent() != NULL);
- _action = newAction;
- _supportData = data;
+ _action = newAction;
+ _supportData = data;
_dynamicSupportData = false;
_roomNumber = roomNum;
}
@@ -1360,7 +1360,7 @@ CurrentActionEntry::CurrentActionEntry(CurrentActionEntry *src) {
_action = src->_action;
_dynamicSupportData = src->_dynamicSupportData;
_roomNumber = src->_roomNumber;
- if (!_dynamicSupportData)
+ if (!_dynamicSupportData)
_supportData = src->_supportData;
else if (src->_supportData == NULL)
_supportData = NULL;
@@ -1426,7 +1426,7 @@ CurrentActionEntry *CurrentActionEntry::loadFromStream(ReadStream *stream) {
uint16 *paramList = new uint16[numParams];
for (int index = 0; index < numParams; ++index)
paramList[index] = stream->readUint16LE();
-
+
result->_supportData->setDetails2(action, numParams, paramList);
delete paramList;
} else {
@@ -1459,7 +1459,7 @@ void CurrentActionStack::list(char *buffer) {
}
else
printf("style=%d room#=%d", entry->action(), entry->roomNumber());
-
+
if (entry->hasSupportData()) {
CharacterScheduleEntry &rec = entry->supportData();
@@ -1470,7 +1470,7 @@ void CurrentActionStack::list(char *buffer) {
else
printf(", action=%d params=", rec.action());
- if (rec.numParams() == 0)
+ if (rec.numParams() == 0)
if (buffer) {
strcat(buffer, "none");
buffer += strlen(buffer);
@@ -1491,7 +1491,7 @@ void CurrentActionStack::list(char *buffer) {
if (buffer) {
sprintf(buffer, "%d", rec.param(ctr));
buffer += strlen(buffer);
- } else
+ } else
printf("%d", rec.param(ctr));
}
}
diff --git a/engines/lure/res_struct.h b/engines/lure/res_struct.h
index bf518bf307..dca23add78 100644
--- a/engines/lure/res_struct.h
+++ b/engines/lure/res_struct.h
@@ -237,7 +237,7 @@ struct RoomExitIndexedHotspotResource {
enum SoundDescFlags {SF_IN_USE = 1, SF_RESTORE = 2};
-// In desc entry, numChannels: bits 0-1 # roland, bits 2-3 #adlib, bits 4-5 #internal
+// In desc entry, numChannels: bits 0-1 # roland, bits 2-3 #adlib, bits 4-5 #internal
struct SoundDescResource {
uint8 soundNumber;
@@ -279,7 +279,7 @@ public:
return result;
}
- typename Common_List::iterator erase(typename Common_List::iterator first,
+ typename Common_List::iterator erase(typename Common_List::iterator first,
typename Common_List::iterator last) {
while (first != last)
@@ -290,7 +290,7 @@ public:
T operator[](int index) {
typename Common_List::iterator i = Common_List::begin();
- while (index-- > 0)
+ while (index-- > 0)
++i;
return *i;
}
@@ -432,14 +432,14 @@ public:
};
enum CharacterMode {CHARMODE_NONE, CHARMODE_HESITATE, CHARMODE_IDLE, CHARMODE_PAUSED,
- CHARMODE_WAIT_FOR_PLAYER, CHARMODE_CONVERSING, CHARMODE_PLAYER_WAIT,
+ CHARMODE_WAIT_FOR_PLAYER, CHARMODE_CONVERSING, CHARMODE_PLAYER_WAIT,
CHARMODE_WAIT_FOR_INTERACT, CHARMODE_INTERACTING, CHARMODE_SPECIAL_PLAYER};
enum BlockedState {BS_NONE, BS_INITIAL, BS_FINAL};
enum VariantBool {VB_INITIAL, VB_FALSE, VB_TRUE};
-enum CurrentAction {NO_ACTION, START_WALKING, DISPATCH_ACTION, EXEC_HOTSPOT_SCRIPT,
+enum CurrentAction {NO_ACTION, START_WALKING, DISPATCH_ACTION, EXEC_HOTSPOT_SCRIPT,
PROCESSING_PATH, WALKING};
class CharacterScheduleSet;
@@ -453,7 +453,7 @@ private:
public:
CharacterScheduleEntry() { _action = NONE; _parent = NULL; }
CharacterScheduleEntry(Action theAction, ...);
- CharacterScheduleEntry(CharacterScheduleSet *parentSet,
+ CharacterScheduleEntry(CharacterScheduleSet *parentSet,
CharacterScheduleResource *&rec);
CharacterScheduleEntry(CharacterScheduleEntry *src);
@@ -483,7 +483,7 @@ public:
}
CurrentAction action() { return _action; }
- CharacterScheduleEntry &supportData() {
+ CharacterScheduleEntry &supportData() {
if (!_supportData) error("Access made to non-defined action support record");
return *_supportData;
}
@@ -491,9 +491,9 @@ public:
uint16 roomNumber() { return _roomNumber; }
void setAction(CurrentAction newAction) { _action = newAction; }
void setRoomNumber(uint16 roomNum) { _roomNumber = roomNum; }
- void setSupportData(CharacterScheduleEntry *newRec) {
+ void setSupportData(CharacterScheduleEntry *newRec) {
assert((newRec == NULL) || (newRec->parent() != NULL));
- _supportData = newRec;
+ _supportData = newRec;
}
void setSupportData(uint16 entryId);
@@ -504,8 +504,8 @@ public:
class CurrentActionStack {
private:
ManagedList<CurrentActionEntry *> _actions;
- void validateStack() {
- if (_actions.size() > 20)
+ void validateStack() {
+ if (_actions.size() > 20)
error("NPC character got an excessive number of pending actions");
}
public:
@@ -554,7 +554,7 @@ class HotspotData {
public:
CurrentActionStack npcSchedule;
HotspotData(HotspotResource *rec);
-
+
uint16 hotspotId;
uint16 nameId;
uint16 descId;
@@ -599,7 +599,7 @@ public:
uint16 talkDestCharacterId;
uint16 talkCountdown;
uint16 pauseCtr;
- uint16 useHotspotId;
+ uint16 useHotspotId;
uint16 talkGate;
uint16 actionHotspotId;
uint16 talkOverride;
@@ -639,7 +639,7 @@ public:
class MovementDataList: public ManagedList<MovementData *> {
public:
- bool getFrame(uint16 currentFrame, int16 &xChange, int16 &yChange,
+ bool getFrame(uint16 currentFrame, int16 &xChange, int16 &yChange,
uint16 &nextFrame);
};
@@ -773,7 +773,7 @@ class CharacterScheduleSet: public ManagedList<CharacterScheduleEntry *> {
private:
uint16 _id;
public:
- CharacterScheduleSet(CharacterScheduleResource *rec, uint16 setId);
+ CharacterScheduleSet(CharacterScheduleResource *rec, uint16 setId);
uint16 getId(CharacterScheduleEntry *rec);
uint16 id() { return _id; }
};
@@ -880,12 +880,12 @@ struct RoomTranslationRecord {
extern const RoomTranslationRecord roomTranslations[];
-enum StringEnum {S_CREDITS = 25, S_RESTART_GAME = 26, S_SAVE_GAME = 27, S_RESTORE_GAME = 28,
- S_QUIT = 29, S_FAST_TEXT = 30, S_SLOW_TEXT = 31, S_SOUND_ON = 32, S_SOUND_OFF = 33,
- S_ACTION_NOTHING = 34, S_FOR = 35, S_TO = 36, S_ON = 37, S_AND_THEN = 38, S_FINISH = 39,
- S_CONFIRM_YN = 40, S_YOU_ARE_CARRYING = 41, S_INV_NOTHING = 42, S_YOU_HAVE = 43,
+enum StringEnum {S_CREDITS = 25, S_RESTART_GAME = 26, S_SAVE_GAME = 27, S_RESTORE_GAME = 28,
+ S_QUIT = 29, S_FAST_TEXT = 30, S_SLOW_TEXT = 31, S_SOUND_ON = 32, S_SOUND_OFF = 33,
+ S_ACTION_NOTHING = 34, S_FOR = 35, S_TO = 36, S_ON = 37, S_AND_THEN = 38, S_FINISH = 39,
+ S_CONFIRM_YN = 40, S_YOU_ARE_CARRYING = 41, S_INV_NOTHING = 42, S_YOU_HAVE = 43,
S_GROAT = 44, S_GROATS = 45,
- S_ARTICLE_LIST = 46};
+ S_ARTICLE_LIST = 46};
class StringList {
private:
@@ -907,14 +907,14 @@ public:
const char *getString(StringEnum sEnum) { return getString((int) sEnum); }
};
-// The following class holds the field list used by the script engine as
-// well as miscellaneous fields used by the game.
+// The following class holds the field list used by the script engine as
+// well as miscellaneous fields used by the game.
#define NUM_VALUE_FIELDS 90
enum FieldName {
- ROOM_NUMBER = 0,
- CHARACTER_HOTSPOT_ID = 1,
+ ROOM_NUMBER = 0,
+ CHARACTER_HOTSPOT_ID = 1,
USE_HOTSPOT_ID = 2,
ACTIVE_HOTSPOT_ID = 3,
SEQUENCE_RESULT = 4,
diff --git a/engines/lure/room.cpp b/engines/lure/room.cpp
index e13b5564bf..8fe9b85d1c 100644
--- a/engines/lure/room.cpp
+++ b/engines/lure/room.cpp
@@ -34,7 +34,7 @@ namespace Lure {
static Room *int_room;
-RoomLayer::RoomLayer(uint16 screenId, bool backgroundLayer):
+RoomLayer::RoomLayer(uint16 screenId, bool backgroundLayer):
Surface(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT) {
Disk &disk = Disk::getReference();
byte *screenData = data().data();
@@ -76,7 +76,7 @@ RoomLayer::RoomLayer(uint16 screenId, bool backgroundLayer):
// Check the cell
for (int yP = 0; yP < RECT_SIZE; ++yP) {
if (hasPixels) break;
- byte *linePos = screenData + (cellY * RECT_SIZE + yP + MENUBAR_Y_SIZE)
+ byte *linePos = screenData + (cellY * RECT_SIZE + yP + MENUBAR_Y_SIZE)
* FULL_SCREEN_WIDTH + (cellX * RECT_SIZE);
for (int xP = 0; xP < RECT_SIZE; ++xP) {
@@ -86,7 +86,7 @@ RoomLayer::RoomLayer(uint16 screenId, bool backgroundLayer):
}
}
- _cells[cellY + NUM_EDGE_RECTS][cellX + NUM_EDGE_RECTS] =
+ _cells[cellY + NUM_EDGE_RECTS][cellX + NUM_EDGE_RECTS] =
hasPixels ? cellIndex++ : 0xff;
}
}
@@ -133,7 +133,7 @@ Room &Room::getReference() {
void Room::leaveRoom() {
Resources &r = Resources::getReference();
- // Scan through the hotspot list and remove any uneeded entries
+ // Scan through the hotspot list and remove any uneeded entries
HotspotList &list = r.activeHotspots();
HotspotList::iterator i = list.begin();
@@ -155,7 +155,7 @@ void Room::loadRoomHotspots() {
for (i = list.begin(); i != list.end(); ++i) {
HotspotData *rec = *i;
- if ((rec->hotspotId < 0x7530) && (rec->roomNumber == _roomNumber) &&
+ if ((rec->hotspotId < 0x7530) && (rec->roomNumber == _roomNumber) &&
(rec->layer != 0))
r.activateHotspot(rec->hotspotId);
}
@@ -185,7 +185,7 @@ void Room::checkRoomHotspots() {
bool skipFlag = (entry->roomNumber != _roomNumber);
if (!skipFlag) {
- skipFlag = (((entry->flags & HOTSPOTFLAG_FOUND) == 0) &&
+ skipFlag = (((entry->flags & HOTSPOTFLAG_FOUND) == 0) &&
((entry->flags & HOTSPOTFLAG_SKIP) != 0)) ||
((entry->flags & HOTSPOTFLAG_MENU_EXCLUSION) != 0);
}
@@ -193,11 +193,11 @@ void Room::checkRoomHotspots() {
if ((!skipFlag) && (entry->hotspotId < 0x409))
// For character hotspots, validate they're in clipping range
skipFlag = !res.checkHotspotExtent(entry);
-
+
if (!skipFlag && (entry->hotspotId >= 0x2710) && (entry->hotspotId <= 0x27ff)) {
RoomExitJoinData *rec = res.getExitJoin(entry->hotspotId);
if ((rec) && (!rec->blocked))
- // Hotspot is over a room exit, and it's not blocked, so don't
+ // Hotspot is over a room exit, and it's not blocked, so don't
// register it as an active hotspot
skipFlag = true;
}
@@ -215,15 +215,15 @@ void Room::checkRoomHotspots() {
} else {
// Check whether cursor is in default hospot area
if ((currentX >= entry->startX) && (currentY >= entry->startY) &&
- (currentX < entry->startX + entry->widthCopy) &&
- (currentY < entry->startY + entry->height))
+ (currentX < entry->startX + entry->widthCopy) &&
+ (currentY < entry->startY + entry->height))
// Found hotspot entry
break;
}
}
}
- if (i != list.end())
+ if (i != list.end())
break;
}
@@ -292,9 +292,9 @@ void Room::addAnimation(Hotspot &h) {
if (_showInfo) {
int16 x = h.x();
int16 y = h.y();
- if ((x >= 0) && (x < FULL_SCREEN_WIDTH) && (y >= 0) && (y < FULL_SCREEN_HEIGHT))
+ if ((x >= 0) && (x < FULL_SCREEN_WIDTH) && (y >= 0) && (y < FULL_SCREEN_HEIGHT))
sprintf(buffer, "%xh", h.hotspotId());
-
+
}
}
@@ -308,7 +308,7 @@ void Room::addLayers(Hotspot &h) {
int16 yStart = hsY / RECT_SIZE;
int16 yEnd = (hsY + h.heightCopy() - 1) / RECT_SIZE;
int16 numY = yEnd - yStart + 1;
-
+
if ((xStart < 0) || (yEnd < 0))
return;
@@ -384,8 +384,8 @@ void Room::blockMerge() {
}
}
}
- }
- }
+ }
+ }
}
void Room::layersPostProcess() {
@@ -450,7 +450,7 @@ void Room::update() {
List<Hotspot *>::iterator iTemp;
for (i = hotspots.begin(); i != hotspots.end(); ++i) {
Hotspot *h = i.operator*();
- if ((h->layer() != 1) || (h->roomNumber() != _roomNumber) ||
+ if ((h->layer() != 1) || (h->roomNumber() != _roomNumber) ||
h->skipFlag() || !h->isActiveAnimation())
continue;
int16 endY = h->y() + h->heightCopy();
@@ -458,7 +458,7 @@ void Room::update() {
for (iTemp = tempList.begin(); iTemp != tempList.end(); ++iTemp) {
Hotspot *hTemp = iTemp.operator*();
int16 tempY = hTemp->y() + hTemp->heightCopy();
- if (endY < tempY) break;
+ if (endY < tempY) break;
}
tempList.insert(iTemp, h);
}
@@ -477,18 +477,18 @@ void Room::update() {
}
}
- // Show any active talk dialog
+ // Show any active talk dialog
if (_talkDialog) {
// Make sure the character is still active and in the viewing room
Hotspot *talkCharacter = res.getActiveHotspot(res.getTalkingCharacter());
- if ((talkCharacter != NULL) && (talkCharacter->roomNumber() == _roomNumber))
+ if ((talkCharacter != NULL) && (talkCharacter->roomNumber() == _roomNumber))
_talkDialog->copyTo(&s, _talkDialogX, _talkDialogY);
}
// Handle showing the status line
if (!*_statusLine) {
// No current status action being display
- if (_hotspotId != 0)
+ if (_hotspotId != 0)
s.writeString(0, 0, _hotspotName, false);
} else {
// Word wrap (if necessary) the status line and dispaly it
@@ -507,7 +507,7 @@ void Room::update() {
// Debug - if the bottle object is on layer 0FEh, then display it's surface
Hotspot *displayHotspot = res.getActiveHotspot(BOTTLE_HOTSPOT_ID);
- if ((displayHotspot != NULL) && (displayHotspot->layer() == 0xfe))
+ if ((displayHotspot != NULL) && (displayHotspot->layer() == 0xfe))
displayHotspot->frames().copyTo(&s);
// If show information is turned on, show extra debugging information
@@ -518,7 +518,7 @@ void Room::update() {
for (int yctr = 0; yctr < ROOM_PATHS_HEIGHT; ++yctr) {
for (int xctr = 0; xctr < ROOM_PATHS_WIDTH; ++xctr) {
/*
- if (_roomData->paths.isOccupied(xctr, yctr))
+ if (_roomData->paths.isOccupied(xctr, yctr))
s.fillRect(Rect(xctr * 8, yctr * 8 + 8, xctr * 8 + 7, yctr * 8 + 15), 255);
*/
uint16 v = tempLayer[(yctr + 1) * DECODED_PATHS_WIDTH + xctr + 1];
@@ -585,7 +585,7 @@ void Room::setRoomNumber(uint16 newRoomNumber, bool showOverlay) {
_numLayers = _roomData->numLayers;
if (showOverlay) ++_numLayers;
- for (uint8 layerNum = 0; layerNum < _numLayers; ++layerNum)
+ for (uint8 layerNum = 0; layerNum < _numLayers; ++layerNum)
_layers[layerNum] = new RoomLayer(_roomData->layers[layerNum],
layerNum == 0);
@@ -612,7 +612,7 @@ void Room::setRoomNumber(uint16 newRoomNumber, bool showOverlay) {
loadRoomHotspots();
if (leaveFlag) {
- // A previous room has been left - check if there are any seconds worth
+ // A previous room has been left - check if there are any seconds worth
// of animations that need to be done in 'fast forward'
if ((_roomData->exitTime != 0xffff) && (_roomData->exitTime != 0)) {
// If time has passed, animation ticks needed before room is displayed
@@ -667,7 +667,7 @@ void Room::checkCursor() {
} else if (mouse.y() < MENUBAR_Y_SIZE) {
// If viewing a room remotely, then don't change to the menu cursor
if (oldRoomNumber != 0) return;
-
+
newCursor = CURSOR_MENUBAR;
} else if (_cursorState != CS_NONE) {
// Currently in a special mode
@@ -676,18 +676,18 @@ void Room::checkCursor() {
} else {
// Check for a highlighted hotspot
checkRoomHotspots();
-
+
if (_hotspotId != 0) {
newCursor = CURSOR_CROSS;
} else {
newCursor = checkRoomExits();
}
- if (oldHotspotId != _hotspotId)
+ if (oldHotspotId != _hotspotId)
StringData::getReference().getString(_hotspotNameId, _hotspotName);
}
- if (mouse.getCursorNum() != newCursor)
+ if (mouse.getCursorNum() != newCursor)
mouse.setCursorNum(newCursor);
}
@@ -725,7 +725,7 @@ void Room::setTalkDialog(uint16 srcCharacterId, uint16 destCharacterId, uint16 u
if (_talkDialogX < 0) _talkDialogX = 0;
if (_talkDialogX + TALK_DIALOG_WIDTH >= FULL_SCREEN_WIDTH - 10)
- _talkDialogX = FULL_SCREEN_WIDTH - 10 - TALK_DIALOG_WIDTH;
+ _talkDialogX = FULL_SCREEN_WIDTH - 10 - TALK_DIALOG_WIDTH;
_talkDialogY = TALK_DIALOG_Y;
debugC(ERROR_DETAILED, kLureDebugAnimations, "Room::setTalkDialog end");
@@ -737,11 +737,11 @@ void Room::setTalkDialog(uint16 srcCharacterId, uint16 destCharacterId, uint16 u
bool Room::checkInTalkDialog() {
// Make sure there is a talk dialog active
if (!_talkDialog) return false;
-
+
// Don't allow dialog close if it's still in progress
if (_talkDialog->isBuilding()) return false;
- // Only allow the dialog to be closable if it's the player talking, or
+ // Only allow the dialog to be closable if it's the player talking, or
// someone talking to the player
Resources &res = Resources::getReference();
uint16 talkerId = res.getTalkingCharacter();
@@ -763,9 +763,9 @@ bool Room::checkInTalkDialog() {
}
void Room::saveToStream(Common::WriteStream *stream) {
- if (_talkDialog == NULL)
+ if (_talkDialog == NULL)
stream->writeUint16LE(0);
- else
+ else
_talkDialog->saveToStream(stream);
stream->writeUint16LE(_roomNumber);
@@ -799,8 +799,8 @@ void Room::loadFromStream(Common::ReadStream *stream) {
_cursorState = (CursorState) stream->readUint16LE();
}
-void Room::reset() {
- _roomNumber = 999;
+void Room::reset() {
+ _roomNumber = 999;
setTalkDialog(0, 0, 0, 0);
_hotspotId = 0;
diff --git a/engines/lure/screen.cpp b/engines/lure/screen.cpp
index 15bd6d4913..35039be1a7 100644
--- a/engines/lure/screen.cpp
+++ b/engines/lure/screen.cpp
@@ -38,8 +38,8 @@ Screen &Screen::getReference() {
return *int_disk;
}
-Screen::Screen(OSystem &system): _system(system),
- _screen(new Surface(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT)),
+Screen::Screen(OSystem &system): _system(system),
+ _screen(new Surface(FULL_SCREEN_WIDTH, FULL_SCREEN_HEIGHT)),
_disk(Disk::getReference()),
_palette(new Palette(GAME_PALETTE_RESOURCE_ID, RGB64)) {
int_disk = this;
@@ -105,7 +105,7 @@ void Screen::paletteFadeIn(Palette *p) {
bool isDifferent = *pCurrent < *pFinal;
if (isDifferent) {
- if ((*pFinal - *pCurrent) < PALETTE_FADE_INC_SIZE)
+ if ((*pFinal - *pCurrent) < PALETTE_FADE_INC_SIZE)
*pCurrent = *pFinal;
else
*pCurrent += PALETTE_FADE_INC_SIZE;
@@ -136,7 +136,7 @@ void Screen::paletteFadeOut(int numEntries) {
changed = false;
for (uint32 palCtr = 0; palCtr < (uint32)(numEntries * PALETTE_FADE_INC_SIZE); ++palCtr, ++pTemp) {
- if (palCtr % PALETTE_FADE_INC_SIZE == (PALETTE_FADE_INC_SIZE - 1))
+ if (palCtr % PALETTE_FADE_INC_SIZE == (PALETTE_FADE_INC_SIZE - 1))
continue;
bool isDifferent = *pTemp > 0;
if (isDifferent) {
diff --git a/engines/lure/scripts.cpp b/engines/lure/scripts.cpp
index 1949ae5ad0..34b1dd3757 100644
--- a/engines/lure/scripts.cpp
+++ b/engines/lure/scripts.cpp
@@ -36,20 +36,20 @@
namespace Lure {
-// This list of hotspot Ids are used by sequence method #5 to deallocate a set
+// This list of hotspot Ids are used by sequence method #5 to deallocate a set
// of hotspot Ids at once
static const uint16 dealloc_list_1[] = {0x13F2, 0x418, 0x2711, 0x2712, 0x40D, 0x3EA, 0x411, 0};
static const uint16 dealloc_list_2[] = {0x2729, 0x272A, 0x272B, 0x272C, 0x272E, 0x272E, 0x272F, 0};
-static const uint16 dealloc_list_3[] = {0x3EF, 0x3E9, 0x3EB, 0x3EC, 0x3ED, 0x3EE, 0x3F0, 0x3F1,
- 0x420, 0x429, 0x436, 0x2715, 0x2716, 0x2717, 0x2718, 0x2719, 0x271A, 0x271E,
+static const uint16 dealloc_list_3[] = {0x3EF, 0x3E9, 0x3EB, 0x3EC, 0x3ED, 0x3EE, 0x3F0, 0x3F1,
+ 0x420, 0x429, 0x436, 0x2715, 0x2716, 0x2717, 0x2718, 0x2719, 0x271A, 0x271E,
0x271F, 0x2720, 0x2721, 0x2722, 0x2725, 0x2726, 0};
static const uint16 *hotspot_dealloc_set[4] = {&dealloc_list_1[0], &dealloc_list_2[0],
&dealloc_list_3[1], &dealloc_list_3[0]};
// Details used for co-ordination of sounds during the endgame sequence
static const AnimSoundSequence soundList[] = {
- {9, 0x45, 2, 0}, {27, 0x48, 5, 0}, {24, 0x46, 3, 0}, {24, 0x37, 1, 0}, {3, 0x37, 1, 1},
- {3, 0x37, 1, 2}, {3, 0x37, 1, 3}, {3, 0x37, 1, 4}, {4, 0x37, 1, 5}, {7, 0x47, 4, 6},
+ {9, 0x45, 2, 0}, {27, 0x48, 5, 0}, {24, 0x46, 3, 0}, {24, 0x37, 1, 0}, {3, 0x37, 1, 1},
+ {3, 0x37, 1, 2}, {3, 0x37, 1, 3}, {3, 0x37, 1, 4}, {4, 0x37, 1, 5}, {7, 0x47, 4, 6},
{31, 0x00, 6, 0}, {0, 0, 0, 0}
};
@@ -103,7 +103,7 @@ void Script::clearSequenceDelayList(uint16 v1, uint16 scriptIndex, uint16 v3) {
// Deactivates a set of predefined of hotspots in a given list index
void Script::deactivateHotspotSet(uint16 listIndex, uint16 v2, uint16 v3) {
- if (listIndex > 3)
+ if (listIndex > 3)
error("Script::deactiveHotspotSet - Invalid list index");
Resources &res = Resources::getReference();
const uint16 *hotspotId = hotspot_dealloc_set[listIndex];
@@ -130,12 +130,12 @@ void Script::resetPathfinder(uint16 v1, uint16 v2, uint16 v3) {
void Script::deactivateHotspot(uint16 hotspotId, uint16 v2, uint16 v3) {
Resources &rsc = Resources::getReference();
- if (hotspotId < START_NONVISUAL_HOTSPOT_ID)
+ if (hotspotId < START_NONVISUAL_HOTSPOT_ID)
rsc.deactivateHotspot(hotspotId);
HotspotData *hs = rsc.getHotspot(hotspotId);
hs->roomNumber = 0xffff;
hs->flags |= 0x20;
- if (hotspotId < START_NONVISUAL_HOTSPOT_ID)
+ if (hotspotId < START_NONVISUAL_HOTSPOT_ID)
hs->layer = 0xff;
}
@@ -321,7 +321,7 @@ void Script::characterChangeRoom(uint16 y, uint16 x, uint16 roomNumber) {
uint16 newRoomNumber = roomNumber & 0xff;
Direction newDirection = (Direction)(roomNumber >> 8);
- Support::characterChangeRoom(*charHotspot, newRoomNumber,
+ Support::characterChangeRoom(*charHotspot, newRoomNumber,
(int16) (x - 0x80), (int16) (y - 0x80), newDirection);
}
@@ -335,7 +335,7 @@ void Script::pauseRatpouch(uint16 v1, uint16 v2, uint16 v3) {
ratpouch->setDelayCtr(0x7fff);
}
-// Sets a character to a given hotspot script, and sets the character's current
+// Sets a character to a given hotspot script, and sets the character's current
// action to executing a script
void Script::setBlockingHotspotScript(uint16 charId, uint16 scriptIndex, uint16 v3) {
@@ -361,7 +361,7 @@ void Script::decrInventoryItems(uint16 v1, uint16 v2, uint16 v3) {
void Script::setTalking(uint16 characterId, uint16 destHotspot, uint16 messageId) {
Hotspot *hotspot = Resources::getReference().getActiveHotspot(characterId);
if (hotspot)
- hotspot->converse(destHotspot, messageId, true, false);
+ hotspot->converse(destHotspot, messageId, true, false);
}
// Sets the current action ctr value for the given hotspot
@@ -383,7 +383,7 @@ void Script::startSpeaking(uint16 characterId, uint16 destHotspot, uint16 messag
void Script::disableHotspot(uint16 hotspotId, uint16 v2, uint16 v3) {
HotspotData *hotspot = Resources::getReference().getHotspot(hotspotId);
- hotspot->flags |= 0x20;
+ hotspot->flags |= 0x20;
}
// Called when the sack is cut with the knife
@@ -437,7 +437,7 @@ void Script::transformPlayer(uint16 v1, uint16 v2, uint16 v3) {
hotspot->roomNumber = player->roomNumber;
hotspot->startX = player->startX - 14;
hotspot->startY = player->startY - 10;
-
+
Hotspot *activeHotspot = res.activateHotspot(TRANSFORM_ID);
activeHotspot->setActionCtr(0);
activeHotspot->setHotspotScript(0x630);
@@ -450,7 +450,7 @@ void Script::townHallClose(uint16 v1, uint16 v2, uint16 v3) {
joinRec->blocked = 1;
}
-// Sets the sequence result to 1 if the given secondary description for a
+// Sets the sequence result to 1 if the given secondary description for a
// hotspot is empty (for inventory items, this gives the description before
// the item is initially picked up)
@@ -471,7 +471,7 @@ void Script::makeGoewinFollow(uint16 v1, uint16 v2, uint16 v3) {
hotspot->currentActions().clear();
CharacterScheduleEntry *entry = res.charSchedules().getEntry(GOEWIN_CAVE_SUPPORT_ID);
hotspot->currentActions().addFront(DISPATCH_ACTION, entry, ROOMNUM_CAVE);
-
+
hotspot->setActions(hotspot->resource()->actions | (1 << (TELL - 1)));
hotspot->setActionCtr(0);
hotspot->setDelayCtr(0);
@@ -493,7 +493,7 @@ void Script::fixGoewin(uint16 v1, uint16 v2, uint16 v3) {
Hotspot *hotspot = res.getActiveHotspot(GOEWIN_ID);
assert(hotspot);
hotspot->setTickProc(STANDARD_CHARACTER_TICK_PROC);
-
+
CharacterScheduleEntry *entry = res.charSchedules().getEntry(GOEWIN_STANDARD_SUPPORT_ID);
assert(entry);
hotspot->currentActions().clear();
@@ -529,9 +529,9 @@ void Script::checkWakeBrenda(uint16 v1, uint16 v2, uint16 v3) {
ValueTableData &fields = res.fieldList();
Room &room = Room::getReference();
- if ((fields.getField(TALK_INDEX) < 3) &&
+ if ((fields.getField(TALK_INDEX) < 3) &&
(room.roomNumber() == ROOMNUM_DINING_HALL) &&
- (fields.getField(67) == 0))
+ (fields.getField(67) == 0))
// Wake up Brenda
Script::execute(0x1E15);
}
@@ -561,7 +561,7 @@ void Script::setNewSupportData(uint16 index, uint16 hotspotId, uint16 v3) {
void Script::setSupportData(uint16 hotspotId, uint16 index, uint16 v3) {
Resources &res = Resources::getReference();
-
+
// WORKAROUND: In room #45, the script for the Skorl noticing you gets
// the parameters back to front. If this the case, just ignore it
if (index == CASTLE_SKORL_ID) return;
@@ -592,7 +592,7 @@ void Script::decreaseNumGroats(uint16 characterId, uint16 numGroats, uint16 v3)
fields.numGroats() -= numGroats;
}
-// Makes Goewin work
+// Makes Goewin work
void Script::makeGoewinWork(uint16 v1, uint16 v2, uint16 v3) {
Resources &res = Resources::getReference();
@@ -615,7 +615,7 @@ void Script::moveCharacterToPlayer(uint16 characterId, uint16 v2, uint16 v3) {
Resources &res = Resources::getReference();
Hotspot *playerHotspot = res.getActiveHotspot(PLAYER_ID);
Hotspot *charHotspot = res.getActiveHotspot(characterId);
- assert(charHotspot);
+ assert(charHotspot);
// If character in same room as player, then no need to do anything
if (!charHotspot->currentActions().isEmpty() &&
@@ -623,7 +623,7 @@ void Script::moveCharacterToPlayer(uint16 characterId, uint16 v2, uint16 v3) {
return;
uint16 destRoom = playerHotspot->roomNumber();
- const RoomTranslationRecord *rec;
+ const RoomTranslationRecord *rec;
for (rec = &roomTranslations[0]; rec->srcRoom != 0; ++rec) {
if (rec->srcRoom == destRoom) {
destRoom = rec->destRoom;
@@ -660,7 +660,7 @@ void Script::barmanServe(uint16 v1, uint16 v2, uint16 v3) {
Resources &res = Resources::getReference();
Hotspot *player = res.getActiveHotspot(PLAYER_ID);
BarEntry &barEntry = res.barmanLists().getDetails(player->roomNumber());
-
+
for (int index = 0; index < NUM_SERVE_CUSTOMERS; ++index) {
if (barEntry.customers[index].hotspotId == PLAYER_ID) {
barEntry.customers[index].serveFlags |= 5;
@@ -681,7 +681,7 @@ void Script::checkHasBook(uint16 v1, uint16 v2, uint16 v3) {
HotspotData *bookHotspot = res.getHotspot(BOOK_ID);
res.fieldList().setField(SEQUENCE_RESULT, (bookHotspot->roomNumber == PLAYER_ID) ? 1 : 0);
}
-
+
// Enables the talk action on the two gargoyles
void Script::enableGargoylesTalk(uint16 v1, uint16 v2, uint16 v3) {
@@ -767,7 +767,7 @@ struct SequenceMethodRecord {
};
static const SequenceMethodRecord scriptMethods[] = {
- {0, Script::activateHotspot},
+ {0, Script::activateHotspot},
{1, Script::setHotspotScript},
{2, Script::addSound2},
{3, Script::setHotspotFlagMask},
@@ -844,31 +844,31 @@ static const char *scriptOpcodes[] = {
};
static const char *scriptMethodNames[67] = {
- "ACTIVATE HOTSPOT", "SET HOTSPOT SCRIPT", "ADD SOUND 2", "SET HOTSPOT FLAG MASK",
- "CLEAR SEQUENCE DELAY LIST", "DEACTIVATE HOTSPOT SET", "DEACTIVATE HOTSPOT",
+ "ACTIVATE HOTSPOT", "SET HOTSPOT SCRIPT", "ADD SOUND 2", "SET HOTSPOT FLAG MASK",
+ "CLEAR SEQUENCE DELAY LIST", "DEACTIVATE HOTSPOT SET", "DEACTIVATE HOTSPOT",
"RESET PATHFINDER", "ADD DELAYED SCRIPT", "KILL SOUND",
"IS CHARACTER IN ROOM", "SET HOTSPOT DESC", "SET HOTSPOT NAME",
- "ADD SOUND", "ENDGAME SEQUENCE", "SETUP PIG FIGHT", "DISPLAY DIALOG", "SETUP SKORL FIGHT",
+ "ADD SOUND", "ENDGAME SEQUENCE", "SETUP PIG FIGHT", "DISPLAY DIALOG", "SETUP SKORL FIGHT",
"REMOTE ROOM VIEW SETUP", "SET CHAR SPEAKING TO ITSELF",
"CHECK CELL DOOR", "PLAY MUSIC", "IS DOOR BLOCKED", "IS SKORL IN CELL",
- "PUSH BRICKS", "CHARACTER CHANGE ROOM", "PAUSE RATPOUCH", "SET BLOCKING HOTSPOT SCRIPT",
+ "PUSH BRICKS", "CHARACTER CHANGE ROOM", "PAUSE RATPOUCH", "SET BLOCKING HOTSPOT SCRIPT",
"DECREMENT # INVENTORY ITEMS", "SET TALKING",
"SET ACTION CTR", "START SPEAKING", "DISABLE HOTSPOT", "CUT SACK",
"INCREASE # GROATS", "ENABLE HOTSPOT", "DISPLAY MESSAGE 2", "START OIL BURNER",
"TRANSFORM PLAYER", "JAIL CLOSE",
- "CHECK DROPPED DESC", "MAKE GOEWIN FOLLOW", "CLOSE DOOR", "FIX GOEWIN", "OPEN DOOR",
- "NPC WAIT", "BRENDA BODGE", "DISPLAY MESSAGE", "SET NEW ACTION SUPPORT DATA",
+ "CHECK DROPPED DESC", "MAKE GOEWIN FOLLOW", "CLOSE DOOR", "FIX GOEWIN", "OPEN DOOR",
+ "NPC WAIT", "BRENDA BODGE", "DISPLAY MESSAGE", "SET NEW ACTION SUPPORT DATA",
"SET ACTION SUPPORT DATA",
-
+
"GIVE PLAYER ITEM", "DECREASE # GROATS", "MAKE GOEWIN WORK", "MOVE CHAR TO PLAYER",
- "SET VILLAGE SKORL TICK PROC", "FREE GOEWIN", "BARMAN SERVE", "GET # GROATS",
+ "SET VILLAGE SKORL TICK PROC", "FREE GOEWIN", "BARMAN SERVE", "GET # GROATS",
"CHECK HAS BOOK", "ENABLE GARGOYLE TALK",
- "NORMAL GOEWIN", "KILL PLAYER", "ANIMATION LOAD", "ADD ACTIONS", "RANDOM TO GENERAL",
+ "NORMAL GOEWIN", "KILL PLAYER", "ANIMATION LOAD", "ADD ACTIONS", "RANDOM TO GENERAL",
"CHECK CELL DOOR", "METHOD 66"
};
@@ -905,7 +905,7 @@ uint16 Script::execute(uint16 startOffset) {
strcpy(debugInfo, "");
while (!breakFlag) {
- if (offset >= scriptData->size())
+ if (offset >= scriptData->size())
error("Script failure in script %d - invalid offset %d", startOffset, offset);
if (gDebugLevel >= ERROR_DETAILED)
@@ -922,14 +922,14 @@ uint16 Script::execute(uint16 startOffset) {
if (hasParam) {
// Flag to read next two bytes as active parameter
- if (offset >= scriptData->size()-2)
+ if (offset >= scriptData->size()-2)
error("Script failure in script %d - invalid offset %d", startOffset, offset);
param = READ_LE_UINT16(scripts + offset);
offset += 2;
if (gDebugLevel >= ERROR_DETAILED)
- sprintf(debugInfo + strlen(debugInfo), " [%d]",
+ sprintf(debugInfo + strlen(debugInfo), " [%d]",
((opcode == S_OPCODE_GET_FIELD) || (opcode == S_OPCODE_SET_FIELD)) ?
param >> 1 : param);
}
@@ -950,10 +950,10 @@ uint16 Script::execute(uint16 startOffset) {
case S_OPCODE_OR:
case S_OPCODE_LOGICAL_AND:
case S_OPCODE_LOGICAL_OR:
- sprintf(debugInfo + strlen(debugInfo),
+ sprintf(debugInfo + strlen(debugInfo),
" %d, %d", stack[stack.size() - 1], stack[stack.size() - 2]);
break;
-
+
case S_OPCODE_SET_FIELD:
sprintf(debugInfo + strlen(debugInfo), " <= ST (%d)", stack[stack.size() - 1]);
break;
@@ -1091,7 +1091,7 @@ uint16 Script::execute(uint16 startOffset) {
else if (stack.size() == 1)
sprintf(debugInfo + strlen(debugInfo), " (%d)", stack[stack.size()-1]);
strcat(debugInfo, ")");
-
+
debugC(ERROR_DETAILED, kLureDebugScripts, debugInfo);
}
@@ -1100,7 +1100,7 @@ uint16 Script::execute(uint16 startOffset) {
if (!stack.empty()) param2 = stack.pop();
if (!stack.empty()) param3 = stack.pop();
- if (rec->methodIndex == 0xff)
+ if (rec->methodIndex == 0xff)
warning("Undefined script method %d", param);
else {
ptr = rec->proc;
@@ -1123,7 +1123,7 @@ uint16 Script::execute(uint16 startOffset) {
case S_OPCODE_END:
// Signal to end the execution
- if (!methodStack.empty())
+ if (!methodStack.empty())
offset = methodStack.pop();
else
breakFlag = true;
@@ -1167,7 +1167,7 @@ uint16 Script::execute(uint16 startOffset) {
}
uint16 result = fields.getField(SEQUENCE_RESULT);
- debugC(ERROR_DETAILED, kLureDebugScripts, "Script result = %d", result);
+ debugC(ERROR_DETAILED, kLureDebugScripts, "Script result = %d", result);
return result;
}
@@ -1177,7 +1177,7 @@ uint16 Script::execute(uint16 startOffset) {
/*------------------------------------------------------------------------*/
int16 HotspotScript::nextVal(MemoryBlock *data, uint16 &offset) {
- if (offset >= data->size() - 1)
+ if (offset >= data->size() - 1)
error("Script failure - invalid offset");
int16 value = READ_LE_UINT16(data->data() + offset);
offset += 2;
@@ -1194,7 +1194,7 @@ bool HotspotScript::execute(Hotspot *h) {
uint32 actions;
bool breakFlag = false;
- debugC(ERROR_BASIC, kLureDebugScripts, "Executing hotspot %xh script pos=%xh",
+ debugC(ERROR_BASIC, kLureDebugScripts, "Executing hotspot %xh script pos=%xh",
h->hotspotId(), offset);
while (!breakFlag) {
@@ -1213,16 +1213,16 @@ bool HotspotScript::execute(Hotspot *h) {
case S2_OPCODE_POSITION:
param1 = nextVal(scriptData, offset);
param2 = nextVal(scriptData, offset);
- debugC(ERROR_DETAILED, kLureDebugScripts, "SET POSITION = (%d,%d)",
+ debugC(ERROR_DETAILED, kLureDebugScripts, "SET POSITION = (%d,%d)",
param1 - 0x80, param2 - 0x80);
h->setPosition(param1 - 0x80, param2 - 0x80);
break;
-
+
case S2_OPCODE_CHANGE_POS:
param1 = nextVal(scriptData, offset);
param2 = nextVal(scriptData, offset);
- debugC(ERROR_DETAILED, kLureDebugScripts, "CHANGE POSITION BY = (%d,%d)",
+ debugC(ERROR_DETAILED, kLureDebugScripts, "CHANGE POSITION BY = (%d,%d)",
param1, param2);
h->setPosition(h->x() + param1, h->y() + param2);
diff --git a/engines/lure/sound.cpp b/engines/lure/sound.cpp
index afb2928bf8..0a0ae3d34d 100644
--- a/engines/lure/sound.cpp
+++ b/engines/lure/sound.cpp
@@ -202,10 +202,10 @@ void SoundManager::addSound(uint8 soundIndex, bool tidyFlag) {
++channelCtr2;
}
- if (foundSpace)
+ if (foundSpace)
break;
}
-
+
++channelCtr;
}
@@ -229,7 +229,7 @@ void SoundManager::addSound(uint8 soundIndex, bool tidyFlag) {
// Map each two channels to four of the 16 available channels
byte innerChannel = (channelCtr / 2) * 4;
musicInterface_Play(rec.soundNumber, innerChannel);
- setVolume(rec.soundNumber, rec.volume);
+ setVolume(rec.soundNumber, rec.volume);
}
void SoundManager::addSound2(uint8 soundIndex) {
@@ -261,12 +261,12 @@ void SoundManager::killSound(uint8 soundNumber) {
}
void SoundManager::setVolume(uint8 soundNumber, uint8 volume) {
- debugC(ERROR_BASIC, kLureDebugSounds, "SoundManager::setVolume soundNumber=%d, volume=%d",
+ debugC(ERROR_BASIC, kLureDebugSounds, "SoundManager::setVolume soundNumber=%d, volume=%d",
soundNumber, volume);
musicInterface_TidySounds();
SoundDescResource *entry = findSound(soundNumber);
- if (entry)
+ if (entry)
musicInterface_SetVolume(entry->channel, volume);
}
@@ -281,7 +281,7 @@ void SoundManager::setVolume(uint8 volume) {
uint8 SoundManager::descIndexOf(uint8 soundNumber) {
SoundDescResource *rec = soundDescs();
-
+
for (uint8 index = 0; index < _numDescs; ++index, ++rec) {
if (rec->soundNumber == soundNumber)
return index;
@@ -321,7 +321,7 @@ void SoundManager::tidySounds() {
else {
// Mark the channels that it used as now being free
Common::set_to(_channelsInUse+rec->channel, _channelsInUse+rec->channel+rec->numChannels, false);
-
+
i = _activeSounds.erase(i);
}
}
@@ -336,7 +336,7 @@ void SoundManager::removeSounds() {
while (i != _activeSounds.end()) {
SoundDescResource *rec = *i;
- if ((rec->flags & SF_IN_USE) != 0)
+ if ((rec->flags & SF_IN_USE) != 0)
musicInterface_Stop(rec->soundNumber);
++i;
@@ -396,7 +396,7 @@ void SoundManager::fadeOut() {
// Play the specified sound
void SoundManager::musicInterface_Play(uint8 soundNumber, uint8 channelNumber) {
- debugC(ERROR_INTERMEDIATE, kLureDebugSounds, "musicInterface_Play soundNumber=%d, channel=%d",
+ debugC(ERROR_INTERMEDIATE, kLureDebugSounds, "musicInterface_Play soundNumber=%d, channel=%d",
soundNumber, channelNumber);
Game &game = Game::getReference();
@@ -404,7 +404,7 @@ void SoundManager::musicInterface_Play(uint8 soundNumber, uint8 channelNumber) {
error("Sound section has not been specified");
uint8 soundNum = soundNumber & 0x7f;
- if (soundNum > _soundsTotal)
+ if (soundNum > _soundsTotal)
error("Invalid sound index %d requested", soundNum);
if (_driver == NULL)
@@ -430,10 +430,10 @@ void SoundManager::musicInterface_Play(uint8 soundNumber, uint8 channelNumber) {
}
g_system->lockMutex(_soundMutex);
- MidiMusic *sound = new MidiMusic(_driver, _channelsInner, channelNumber, soundNumber,
+ MidiMusic *sound = new MidiMusic(_driver, _channelsInner, channelNumber, soundNumber,
isMusic, soundStart, dataSize);
sound->setVolume(volume);
- _playingSounds.push_back(sound);
+ _playingSounds.push_back(sound);
g_system->unlockMutex(_soundMutex);
}
@@ -484,7 +484,7 @@ bool SoundManager::musicInterface_CheckPlaying(uint8 soundNumber) {
// Sets the volume of the specified channel
void SoundManager::musicInterface_SetVolume(uint8 channelNum, uint8 volume) {
- debugC(ERROR_INTERMEDIATE, kLureDebugSounds, "musicInterface_SetVolume channel=%d, volume=%d",
+ debugC(ERROR_INTERMEDIATE, kLureDebugSounds, "musicInterface_SetVolume channel=%d, volume=%d",
channelNum, volume);
musicInterface_TidySounds();
@@ -539,10 +539,10 @@ void SoundManager::musicInterface_TidySounds() {
debugC(ERROR_DETAILED, kLureDebugSounds, "musicInterface_TidySounds");
g_system->lockMutex(_soundMutex);
- ManagedList<MidiMusic *>::iterator i = _playingSounds.begin();
+ ManagedList<MidiMusic *>::iterator i = _playingSounds.begin();
while (i != _playingSounds.end()) {
MidiMusic *music = *i;
- if (!music->isPlaying())
+ if (!music->isPlaying())
i = _playingSounds.erase(i);
else
++i;
@@ -564,7 +564,7 @@ void SoundManager::doTimer() {
ManagedList<MidiMusic *>::iterator i;
for (i = _playingSounds.begin(); i != _playingSounds.end(); ++i) {
MidiMusic *music = *i;
- if (music->isPlaying())
+ if (music->isPlaying())
music->onTimer();
}
@@ -573,7 +573,7 @@ void SoundManager::doTimer() {
/*------------------------------------------------------------------------*/
-MidiMusic::MidiMusic(MidiDriver *driver, ChannelEntry channels[NUM_CHANNELS_INNER],
+MidiMusic::MidiMusic(MidiDriver *driver, ChannelEntry channels[NUM_CHANNELS_INNER],
uint8 channelNum, uint8 soundNum, bool isMusic, void *soundData, uint32 size) {
Game &game = Game::getReference();
_driver = driver;
@@ -600,9 +600,9 @@ MidiMusic::MidiMusic(MidiDriver *driver, ChannelEntry channels[NUM_CHANNELS_INNE
_soundData = (uint8 *) soundData;
_soundSize = size;
- // Check whether the music data is compressed - if so, decompress it for the duration
+ // Check whether the music data is compressed - if so, decompress it for the duration
// of playing the sound
-
+
_decompressedSound = NULL;
if ((*_soundData == 'C') || (*_soundData == 'c')) {
uint32 packedSize = size - 0x201;
@@ -630,7 +630,7 @@ MidiMusic::~MidiMusic() {
_parser->unloadMusic();
delete _parser;
this->close();
- if (_decompressedSound != NULL)
+ if (_decompressedSound != NULL)
delete _decompressedSound;
}
diff --git a/engines/lure/sound.h b/engines/lure/sound.h
index eda0e42711..fb1fcf6f16 100644
--- a/engines/lure/sound.h
+++ b/engines/lure/sound.h
@@ -65,7 +65,7 @@ private:
bool _passThrough;
public:
- MidiMusic(MidiDriver *driver, ChannelEntry channels[NUM_CHANNELS_INNER],
+ MidiMusic(MidiDriver *driver, ChannelEntry channels[NUM_CHANNELS_INNER],
uint8 channelNum, uint8 soundNum, bool isMusic, void *soundData, uint32 size);
~MidiMusic();
void setVolume(int volume);
diff --git a/engines/lure/strings.cpp b/engines/lure/strings.cpp
index 787f20f258..4f7d47d004 100644
--- a/engines/lure/strings.cpp
+++ b/engines/lure/strings.cpp
@@ -79,13 +79,13 @@ void StringData::add(const char *sequence, char ascii) {
uint32 value = 0;
for (uint8 index = 0; index < strlen(sequence); ++index) {
- if (sequence[index] == '1')
+ if (sequence[index] == '1')
value |= (1 << index);
- else if (sequence[index] != '0')
+ else if (sequence[index] != '0')
error("Invalid character in string bit-stream sequence");
}
- if (_numChars == MAX_NUM_CHARS)
+ if (_numChars == MAX_NUM_CHARS)
error("Max characters too lower in string decoder");
_chars[_numChars++] = new CharacterEntry(strlen(sequence), value, ascii);
}
@@ -103,10 +103,10 @@ byte StringData::readBit() {
bool StringData::initPosition(uint16 stringId) {
uint16 roomNumber = Room::getReference().roomNumber();
-
- if ((roomNumber >= 0x2A) && (stringId >= STRING_ID_RANGE) && (stringId < STRING_ID_UPPER))
+
+ if ((roomNumber >= 0x2A) && (stringId >= STRING_ID_RANGE) && (stringId < STRING_ID_UPPER))
stringId = 0x76;
- if ((roomNumber < 0x2A) && (stringId >= STRING_ID_UPPER))
+ if ((roomNumber < 0x2A) && (stringId >= STRING_ID_UPPER))
stringId = 0x76;
if (stringId < STRING_ID_RANGE)
@@ -120,7 +120,7 @@ bool StringData::initPosition(uint16 stringId) {
}
_srcPos = _stringTable + 4;
-
+
uint32 total = 0;
int numLoops = stringId >> 5;
for (int ctr = 0; ctr < numLoops; ++ctr) {
@@ -131,7 +131,7 @@ bool StringData::initPosition(uint16 stringId) {
numLoops = stringId & 0x1f;
if (numLoops!= 0) {
byte *tempPtr = _stringTable + (stringId & 0xffe0) + READ_LE_UINT16(_stringTable);
-
+
for (int ctr = 0; ctr < numLoops; ++ctr) {
byte v = *tempPtr++;
if ((v & 0x80) == 0) {
@@ -170,8 +170,8 @@ char StringData::readCharacter() {
// Scan through list for a match
for (int index = 0; _chars[index] != NULL; ++index) {
- if ((_chars[index]->_numBits == numBits) &&
- (_chars[index]->_sequence == searchValue))
+ if ((_chars[index]->_numBits == numBits) &&
+ (_chars[index]->_sequence == searchValue))
return _chars[index]->_ascii;
}
}
@@ -181,9 +181,9 @@ char StringData::readCharacter() {
return 0;
}
-void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
+void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
const char *characterName, int hotspotArticle, int characterArticle) {
- debugC(ERROR_INTERMEDIATE, kLureDebugStrings,
+ debugC(ERROR_INTERMEDIATE, kLureDebugStrings,
"StringData::getString stringId=%xh hotspot=%d,%s character=%d,%s",
stringId, hotspotArticle, hotspotName, characterArticle, characterName);
StringList &stringList = Resources::getReference().stringList();
@@ -201,7 +201,7 @@ void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
while (ch != '\0') {
if (ch == '%') {
- // Copy over hotspot or action
+ // Copy over hotspot or action
ch = readCharacter();
const char *p = (ch == '1') ? hotspotName : characterName;
int article = !includeArticles ? 0 : ((ch == '1') ? hotspotArticle : characterArticle);
@@ -234,7 +234,7 @@ void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
charBitMask = _bitMask;
// WORKAROUND: Italian version had an unterminated Look description for Prisoner after cutting sack
- if ((charOffset == 0x1a08) && (charBitMask == 1) &&
+ if ((charOffset == 0x1a08) && (charBitMask == 1) &&
(LureEngine::getReference().getLanguage() == IT_ITA))
// Hardcode for end of string
ch = '\0';
@@ -243,7 +243,7 @@ void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
ch = readCharacter();
}
- debugC(ERROR_DETAILED, kLureDebugStrings, "String data %xh/%.2xh val=%.2xh EOS",
+ debugC(ERROR_DETAILED, kLureDebugStrings, "String data %xh/%.2xh val=%.2xh EOS",
charOffset, charBitMask, ch);
*destPos = '\0';
}
@@ -253,7 +253,7 @@ void StringData::getString(uint16 stringId, char *dest, const char *hotspotName,
char *StringData::getName(uint8 nameIndex) {
uint16 numNames = READ_LE_UINT16(_names->data()) / 2;
- if (nameIndex >= numNames)
+ if (nameIndex >= numNames)
error("Invalid name index was passed to getCharacterName");
uint16 nameStart = READ_LE_UINT16(_names->data() + (nameIndex * 2));
diff --git a/engines/lure/surface.cpp b/engines/lure/surface.cpp
index dd72ba31c9..e1ab0c2b0b 100644
--- a/engines/lure/surface.cpp
+++ b/engines/lure/surface.cpp
@@ -72,7 +72,7 @@ void Surface::initialise() {
byte v = *pChar++;
for (int xp = 0; xp < FONT_WIDTH; ++xp) {
- if ((v & 0x80) && (xp > fontSize[ctr]))
+ if ((v & 0x80) && (xp > fontSize[ctr]))
fontSize[ctr] = xp;
v = (v << 1) & 0xff;
}
@@ -90,7 +90,7 @@ void Surface::deinitialise() {
/*--------------------------------------------------------------------------*/
-Surface::Surface(MemoryBlock *src, uint16 wdth, uint16 hght): _data(src),
+Surface::Surface(MemoryBlock *src, uint16 wdth, uint16 hght): _data(src),
_width(wdth), _height(hght) {
if ((uint32) (wdth * hght) != src->size())
error("Surface dimensions do not match size of passed data");
@@ -128,12 +128,12 @@ void Surface::egaCreateDialog(bool blackFlag) {
// Surface contents
data().setBytes(blackFlag ? 0 : EGA_DIALOG_BG_COLOUR, 0, data().size());
-
+
// Top/bottom lines
for (int y = 2; y >= 0; --y) {
data().setBytes(lineColours1[y], y * width(), width());
data().setBytes(lineColours2[y], (height() - y - 1) * width(), width());
-
+
for (int p = y + 1; p < height() - y; ++p) {
byte *line = data().data() + p * width();
*(line + y) = lineColours2[y];
@@ -147,14 +147,14 @@ void Surface::egaCreateDialog(bool blackFlag) {
void copyLine(byte *pSrc, byte *pDest, uint16 leftSide, uint16 center, uint16 rightSide) {
// Left area
- memcpy(pDest, pSrc, leftSide);
- pSrc += leftSide; pDest += leftSide;
+ memcpy(pDest, pSrc, leftSide);
+ pSrc += leftSide; pDest += leftSide;
// Center area
memset(pDest, *pSrc, center);
- ++pSrc; pDest += center;
+ ++pSrc; pDest += center;
// Right side
- memcpy(pDest, pSrc, rightSide);
- pSrc += rightSide; pDest += rightSide;
+ memcpy(pDest, pSrc, rightSide);
+ pSrc += rightSide; pDest += rightSide;
}
#define VGA_DIALOG_EDGE_WIDTH 9
@@ -189,7 +189,7 @@ void Surface::vgaCreateDialog(bool blackFlag) {
// Final processing - if black flag set, clear dialog inside area
if (blackFlag) {
- Rect r = Rect(VGA_DIALOG_EDGE_WIDTH, VGA_DIALOG_EDGE_WIDTH,
+ Rect r = Rect(VGA_DIALOG_EDGE_WIDTH, VGA_DIALOG_EDGE_WIDTH,
_width - VGA_DIALOG_EDGE_WIDTH, _height-VGA_DIALOG_EDGE_WIDTH);
fillRect(r, 0);
}
@@ -207,7 +207,7 @@ void Surface::loadScreen(MemoryBlock *rawData) {
bool is5Bit = (v & 0xfffe) == 0x140;
MemoryBlock *tmpScreen;
- if (is5Bit)
+ if (is5Bit)
// 5-bit decompression
tmpScreen = decoder.egaDecode(rawData, FULL_SCREEN_HEIGHT * FULL_SCREEN_WIDTH + 1);
else
@@ -215,19 +215,19 @@ void Surface::loadScreen(MemoryBlock *rawData) {
tmpScreen = decoder.vgaDecode(rawData, FULL_SCREEN_HEIGHT * FULL_SCREEN_WIDTH + 1);
empty();
- _data->copyFrom(tmpScreen, 0, MENUBAR_Y_SIZE * FULL_SCREEN_WIDTH,
+ _data->copyFrom(tmpScreen, 0, MENUBAR_Y_SIZE * FULL_SCREEN_WIDTH,
(FULL_SCREEN_HEIGHT - MENUBAR_Y_SIZE) * FULL_SCREEN_WIDTH);
delete tmpScreen;
}
int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int colour) {
byte *const addr = _data->data() + (y * _width) + x;
- if (colour == DEFAULT_TEXT_COLOUR)
+ if (colour == DEFAULT_TEXT_COLOUR)
colour = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR;
if ((ascii < 32) || (ascii >= 32 + numFontChars))
error("Invalid ascii character passed for display '%d'", ascii);
-
+
uint8 v;
byte *pFont = int_font->data() + ((ascii - 32) * 8);
byte *pDest;
@@ -250,16 +250,16 @@ int Surface::writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int co
return charWidth;
}
-void Surface::writeString(uint16 x, uint16 y, Common::String line, bool transparent,
+void Surface::writeString(uint16 x, uint16 y, Common::String line, bool transparent,
int colour, bool varLength) {
writeSubstring(x, y, line, line.size(), transparent, colour, varLength);
}
-void Surface::writeSubstring(uint16 x, uint16 y, Common::String line, int len,
+void Surface::writeSubstring(uint16 x, uint16 y, Common::String line, int len,
bool transparent, int colour, bool varLength) {
const char *sPtr = line.c_str();
- if (colour == DEFAULT_TEXT_COLOUR)
+ if (colour == DEFAULT_TEXT_COLOUR)
colour = LureEngine::getReference().isEGA() ? EGA_DIALOG_TEXT_COLOUR : VGA_DIALOG_TEXT_COLOUR;
for (int index = 0; (index < len) && (*sPtr != '\0'); ++index, ++sPtr) {
@@ -277,7 +277,7 @@ void Surface::writeSubstring(uint16 x, uint16 y, Common::String line, int len,
}
void Surface::transparentCopyTo(Surface *dest) {
- if (dest->width() != _width)
+ if (dest->width() != _width)
error("Incompatible surface sizes for transparent copy");
byte *pSrc = _data->data();
@@ -286,7 +286,7 @@ void Surface::transparentCopyTo(Surface *dest) {
while (numBytes-- > 0) {
if (*pSrc) *pDest = *pSrc;
-
+
++pSrc;
++pDest;
}
@@ -311,7 +311,7 @@ void Surface::copyTo(Surface *dest, uint16 x, uint16 y) {
}
}
-void Surface::copyTo(Surface *dest, const Rect &srcBounds,
+void Surface::copyTo(Surface *dest, const Rect &srcBounds,
uint16 destX, uint16 destY, int transparentColour) {
int numBytes = srcBounds.right - srcBounds.left + 1;
if (destX + numBytes > dest->width())
@@ -372,7 +372,7 @@ void Surface::copyToScreen(uint16 x, uint16 y) {
void Surface::centerOnScreen() {
OSystem &system = *g_system;
- system.copyRectToScreen(_data->data(), _width,
+ system.copyRectToScreen(_data->data(), _width,
(FULL_SCREEN_WIDTH - _width) / 2, (FULL_SCREEN_HEIGHT - _height) / 2,
_width, _height);
system.updateScreen();
@@ -451,7 +451,7 @@ void Surface::wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines)
s = wordEnd+1;
}
- // Set up a list for the start of each line
+ // Set up a list for the start of each line
lines = (char **) Memory::alloc(sizeof(char *) * numLines);
lines[0] = text;
debugC(ERROR_DETAILED, kLureDebugStrings, "wordWrap lines[0]='%s'", lines[0]);
@@ -463,7 +463,7 @@ void Surface::wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines)
debugC(ERROR_INTERMEDIATE, kLureDebugStrings, "wordWrap end - numLines=%d", numLines);
}
-Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength,
+Surface *Surface::newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength,
int colour, bool squashedLines) {
Point size;
Surface::getDialogBounds(size, 0, numLines, squashedLines);
@@ -486,7 +486,7 @@ Surface *Surface::newDialog(uint16 width, const char *line, int colour) {
uint8 numLines;
wordWrap(lineCopy, width - (Surface::textX() * 2), lines, numLines);
- // Create the dialog
+ // Create the dialog
Surface *result = newDialog(width, numLines, const_cast<const char **>(lines), true, colour);
// Deallocate used resources
@@ -651,9 +651,9 @@ struct GermanLanguageArticle {
};
const GermanLanguageArticle germanArticles[] = {
- {&german_pre_k_type[0], &german_pre_k_type_tl[0]},
+ {&german_pre_k_type[0], &german_pre_k_type_tl[0]},
{&german_pre_d[0], &german_pre_d_tl[0]},
- {&german_pre_d_type[0], &german_pre_d_type_tl[0]},
+ {&german_pre_d_type[0], &german_pre_d_type_tl[0]},
{&german_pre_e_type[0], &german_pre_e_type_tl[0]}
};
@@ -676,7 +676,7 @@ int TalkDialog::getArticle(uint16 msgId, uint16 objId) {
if (msgFound) {
// Scan against possible bit combinations
for (const uint16 *p = germanArticles[sectionIndex].translations; *p != 0; p += 2) {
- if (*p == id)
+ if (*p == id)
// Return the article index to use
return *++p + 1;
}
@@ -684,17 +684,17 @@ int TalkDialog::getArticle(uint16 msgId, uint16 objId) {
return 0;
}
}
-
+
return 0;
} else if (language == ES_ESP) {
// Special handling for Spanish langugae
const uint16 *tlData = (msgId == 158) ? spanish_pre_e1_type_tl : spanish_others_tl;
-
+
// Scan through the list of article bitflag mappings
for (const uint16 *p = tlData; *p != 0; p += 2) {
- if (*p == id)
+ if (*p == id)
// Return the article index to use
return *++p + 1;
}
@@ -718,7 +718,7 @@ void TalkDialog::vgaTalkDialog(Surface *s) {
*pDest++ = *pSrc++;
*pDest++ = *pSrc++;
- for (xPos = 0; xPos < TALK_DIALOG_WIDTH - TALK_DIALOG_EDGE_SIZE - 2; ++xPos)
+ for (xPos = 0; xPos < TALK_DIALOG_WIDTH - TALK_DIALOG_EDGE_SIZE - 2; ++xPos)
*pDest++ = *pSrc;
++pSrc;
@@ -733,7 +733,7 @@ void TalkDialog::vgaTalkDialog(Surface *s) {
// Left edge
for (xPos = 0; xPos < TALK_DIALOG_EDGE_SIZE; ++xPos)
*pDest++ = *pSrcTemp++;
-
+
// Middle section
for (xPos = 0; xPos < _surface->width() - TALK_DIALOG_EDGE_SIZE * 2; ++xPos)
*pDest++ = *pSrcTemp;
@@ -750,7 +750,7 @@ void TalkDialog::vgaTalkDialog(Surface *s) {
for (xPos = 0; xPos < TALK_DIALOG_EDGE_SIZE; ++xPos)
*pDest++ = *pSrc++;
- for (xPos = 0; xPos < TALK_DIALOG_WIDTH - TALK_DIALOG_EDGE_SIZE - 2; ++xPos)
+ for (xPos = 0; xPos < TALK_DIALOG_WIDTH - TALK_DIALOG_EDGE_SIZE - 2; ++xPos)
*pDest++ = *pSrc;
++pSrc;
@@ -760,7 +760,7 @@ void TalkDialog::vgaTalkDialog(Surface *s) {
}
TalkDialog::TalkDialog(uint16 characterId, uint16 destCharacterId, uint16 activeItemId, uint16 descId) {
- debugC(ERROR_DETAILED, kLureDebugAnimations, "TalkDialog(chars=%xh/%xh, item=%d, str=%d",
+ debugC(ERROR_DETAILED, kLureDebugAnimations, "TalkDialog(chars=%xh/%xh, item=%d, str=%d",
characterId, destCharacterId, activeItemId, descId);
StringData &strings = StringData::getReference();
Resources &res = Resources::getReference();
@@ -777,7 +777,7 @@ TalkDialog::TalkDialog(uint16 characterId, uint16 destCharacterId, uint16 active
_descId = descId;
HotspotData *talkingChar = res.getHotspot(characterId);
- HotspotData *destCharacter = (destCharacterId == 0) ? NULL :
+ HotspotData *destCharacter = (destCharacterId == 0) ? NULL :
res.getHotspot(destCharacterId);
HotspotData *itemHotspot = (activeItemId == 0) ? NULL :
res.getHotspot(activeItemId);
@@ -805,7 +805,7 @@ TalkDialog::TalkDialog(uint16 characterId, uint16 destCharacterId, uint16 active
debugC(ERROR_DETAILED, kLureDebugAnimations, "Creating talk dialog for %d lines", _numLines);
- _surface = new Surface(TALK_DIALOG_WIDTH,
+ _surface = new Surface(TALK_DIALOG_WIDTH,
(_numLines + 1) * FONT_HEIGHT + TALK_DIALOG_EDGE_SIZE * 4);
if (isEGA)
@@ -849,7 +849,7 @@ void TalkDialog::copyTo(Surface *dest, uint16 x, uint16 y) {
}
// Write out the completed portion of the current line
- _surface->writeSubstring(TALK_DIALOG_EDGE_SIZE + 2,
+ _surface->writeSubstring(TALK_DIALOG_EDGE_SIZE + 2,
TALK_DIALOG_EDGE_SIZE + 4 + (_endLine + 1) * FONT_HEIGHT,
_lines[_endLine], _endIndex, true);
@@ -882,7 +882,7 @@ TalkDialog *TalkDialog::loadFromStream(Common::ReadStream *stream) {
uint16 destCharacterId = stream->readUint16LE();
uint16 activeItemId = stream->readUint16LE();
- uint16 descId = stream->readUint16LE();
+ uint16 descId = stream->readUint16LE();
TalkDialog *dialog = new TalkDialog(characterId, destCharacterId, activeItemId, descId);
dialog->_endLine = stream->readSint16LE();
@@ -929,11 +929,11 @@ bool SaveRestoreDialog::show(bool saveDialog) {
// Figure out a list of present savegames
String **saveNames = (String **)Memory::alloc(sizeof(String *) * MAX_SAVEGAME_SLOTS);
int numSaves = 0;
- while ((numSaves < MAX_SAVEGAME_SLOTS) &&
+ while ((numSaves < MAX_SAVEGAME_SLOTS) &&
((saveNames[numSaves] = engine.detectSave(numSaves + 1)) != NULL))
++numSaves;
- // For the save dialog, if all the slots have not been used up, create a
+ // For the save dialog, if all the slots have not been used up, create a
// blank entry for a new savegame
if (saveDialog && (numSaves < MAX_SAVEGAME_SLOTS))
saveNames[numSaves++] = new String();
@@ -944,7 +944,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
return false;
}
- Surface *s = new Surface(INFO_DIALOG_WIDTH, SR_SAVEGAME_NAMES_Y +
+ Surface *s = new Surface(INFO_DIALOG_WIDTH, SR_SAVEGAME_NAMES_Y +
numSaves * FONT_HEIGHT + FONT_HEIGHT + 2);
// Create the outer dialog and dividing line
@@ -973,7 +973,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
bool doneFlag = false;
while (!abortFlag && !doneFlag) {
// Provide highlighting of lines to select a save slot
- while (!abortFlag && !(mouse.lButton() && (selectedLine != -1))
+ while (!abortFlag && !(mouse.lButton() && (selectedLine != -1))
&& !mouse.rButton() && !mouse.mButton()) {
abortFlag = events.quitFlag;
if (abortFlag) break;
@@ -984,7 +984,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
abortFlag = true;
break;
}
- if (events.type() == Common::EVENT_MOUSEMOVE ||
+ if (events.type() == Common::EVENT_MOUSEMOVE ||
events.type() == Common::EVENT_WHEELUP || events.type() == Common::EVENT_WHEELDOWN) {
// Mouse movement
int lineNum = 0;
@@ -1011,7 +1011,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
if (lineNum != selectedLine) {
if (selectedLine != -1)
// Deselect previously selected line
- toggleHightlight(SAVE_DIALOG_X + Surface::textX(),
+ toggleHightlight(SAVE_DIALOG_X + Surface::textX(),
SAVE_DIALOG_X + s->width() - Surface::textX(),
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + selectedLine * FONT_HEIGHT,
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + (selectedLine + 1) * FONT_HEIGHT - 1);
@@ -1019,7 +1019,7 @@ bool SaveRestoreDialog::show(bool saveDialog) {
// Highlight new line
selectedLine = lineNum;
if (selectedLine != -1)
- toggleHightlight(SAVE_DIALOG_X + Surface::textX(),
+ toggleHightlight(SAVE_DIALOG_X + Surface::textX(),
SAVE_DIALOG_X + s->width() - Surface::textX(),
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + selectedLine * FONT_HEIGHT,
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + (selectedLine + 1) * FONT_HEIGHT - 1);
@@ -1032,8 +1032,8 @@ bool SaveRestoreDialog::show(bool saveDialog) {
}
// Deselect selected row
- if (selectedLine != -1)
- toggleHightlight(SAVE_DIALOG_X + Surface::textX(),
+ if (selectedLine != -1)
+ toggleHightlight(SAVE_DIALOG_X + Surface::textX(),
SAVE_DIALOG_X + s->width() - Surface::textX(),
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + selectedLine * FONT_HEIGHT,
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + (selectedLine + 1) * FONT_HEIGHT - 1);
@@ -1046,14 +1046,14 @@ bool SaveRestoreDialog::show(bool saveDialog) {
// If in save mode, allow the entry of a new savename
if (saveDialog) {
- if (!screen.screen().getString(*saveNames[selectedLine],
- INFO_DIALOG_WIDTH - (Surface::textX() * 2),
- false, true, SAVE_DIALOG_X + Surface::textX(),
+ if (!screen.screen().getString(*saveNames[selectedLine],
+ INFO_DIALOG_WIDTH - (Surface::textX() * 2),
+ false, true, SAVE_DIALOG_X + Surface::textX(),
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + selectedLine * FONT_HEIGHT)) {
- // Aborted out of name selection, so restore old name and
+ // Aborted out of name selection, so restore old name and
// go back to slot selection
screen.screen().writeString(
- SAVE_DIALOG_X + Surface::textX(),
+ SAVE_DIALOG_X + Surface::textX(),
SAVE_DIALOG_Y + SR_SAVEGAME_NAMES_Y + selectedLine * FONT_HEIGHT,
saveNames[selectedLine]->c_str(), true);
selectedLine = -1;
@@ -1140,7 +1140,7 @@ bool RestartRestoreDialog::show() {
// Get the correct button bounds record to use
const RestartRecord *btnRecord = &buttonBounds[0];
- while ((btnRecord->Language != engine.getLanguage()) &&
+ while ((btnRecord->Language != engine.getLanguage()) &&
(btnRecord->Language != UNK_LANG))
++btnRecord;
@@ -1257,7 +1257,7 @@ struct ItemDesc {
static const ItemDesc copyProtectElements[] = {
{UNK_LANG, 104, 96, 32, 48, PROT_SPR_HEADER, 0},
{UNK_LANG, 179, 96, 32, 48, PROT_SPR_HEADER, 0},
-
+
{EN_ANY, 57, 40, 208, 40, WORDING_HEADER, 32},
{FR_FRA, 57, 40, 208, 40, WORDING_HEADER, 32},
{DE_DEU, 39, 30, 240, 53, WORDING_HEADER, 32},
@@ -1330,7 +1330,7 @@ bool CopyProtectionDialog::show() {
while (!events.quitFlag) {
while (events.pollEvent() && (_charIndex < 4)) {
- if (events.type() == Common::EVENT_KEYDOWN) {
+ if (events.type() == Common::EVENT_KEYDOWN) {
if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) {
// Remove the last number typed
--_charIndex;
@@ -1362,7 +1362,7 @@ bool CopyProtectionDialog::show() {
// At this point, two page numbers have been entered - validate them
int page1 = (_hotspots[3]->frameNumber() * 10) + _hotspots[4]->frameNumber();
int page2 = (_hotspots[5]->frameNumber() * 10) + _hotspots[6]->frameNumber();
-
+
if ((page1 == pageNumbers[_hotspots[0]->frameNumber()]) &&
(page2 == pageNumbers[_hotspots[1]->frameNumber()]))
return true;
diff --git a/engines/lure/surface.h b/engines/lure/surface.h
index 6ca24bd5f4..73b7090287 100644
--- a/engines/lure/surface.h
+++ b/engines/lure/surface.h
@@ -65,7 +65,7 @@ public:
int writeChar(uint16 x, uint16 y, uint8 ascii, bool transparent, int colour);
void writeString(uint16 x, uint16 y, Common::String line, bool transparent,
int colour = DEFAULT_TEXT_COLOUR, bool varLength = true);
- void writeSubstring(uint16 x, uint16 y, Common::String line, int len,
+ void writeSubstring(uint16 x, uint16 y, Common::String line, int len,
bool transparent, int colour = DEFAULT_TEXT_COLOUR, bool varLength = true);
void transparentCopyTo(Surface *dest);
void copyTo(Surface *dest);
@@ -82,7 +82,7 @@ public:
static uint16 textWidth(const char *s, int numChars = 0);
static void wordWrap(char *text, uint16 width, char **&lines, uint8 &numLines);
- static Surface *newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength = true,
+ static Surface *newDialog(uint16 width, uint8 numLines, const char **lines, bool varLength = true,
int colour = DEFAULT_TEXT_COLOUR, bool squashedLines = true);
static Surface *newDialog(uint16 width, const char *lines, int colour = DEFAULT_TEXT_COLOUR);
static Surface *getScreen(uint16 resourceId);
diff --git a/engines/module.mk b/engines/module.mk
index 10a29e110a..6cfe9b36fa 100644
--- a/engines/module.mk
+++ b/engines/module.mk
@@ -3,5 +3,5 @@ MODULE := engines
MODULE_OBJS := \
engine.o
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/queen/defs.h b/engines/queen/defs.h
index 9e35ec2523..5b3475d400 100644
--- a/engines/queen/defs.h
+++ b/engines/queen/defs.h
@@ -65,7 +65,7 @@ enum InkColor {
INK_TALK_NORMAL,
INK_JOE,
INK_OUTLINED_TEXT,
-
+
INK_COUNT
};
diff --git a/engines/queen/display.cpp b/engines/queen/display.cpp
index bd4c461080..bac7c5f419 100644
--- a/engines/queen/display.cpp
+++ b/engines/queen/display.cpp
@@ -1455,7 +1455,7 @@ const uint8 Display::_fontGreek[] = {
0xBC, 0x98, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0x00, 0xCC, 0x66, 0x33, 0x66, 0xCC, 0x00, 0x00,
0x9E, 0xB3, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x00, 0x40, 0xC6, 0x4C, 0x58, 0x3E, 0x62, 0xC4, 0x0E,
0xB3, 0xB3, 0x33, 0x1E, 0x0C, 0x0C, 0x0C, 0x00, 0x9E, 0xB3, 0x33, 0x33, 0x1E, 0x00, 0x3F, 0x00,
- 0xB4, 0x00, 0x30, 0x30, 0x30, 0x30, 0x18, 0x00, 0x38, 0x7C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0x00,
+ 0xB4, 0x00, 0x30, 0x30, 0x30, 0x30, 0x18, 0x00, 0x38, 0x7C, 0xC6, 0xC6, 0xFE, 0xC6, 0xC6, 0x00,
0xF8, 0xCC, 0xCC, 0xF8, 0xCC, 0xCC, 0xF8, 0x00, 0xFC, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0xC0, 0x00,
0x38, 0x7C, 0xC6, 0xC6, 0xC6, 0xC6, 0xFE, 0x00, 0xFC, 0xC0, 0xC0, 0xF0, 0xC0, 0xC0, 0xFC, 0x00,
0xFC, 0x0C, 0x18, 0x30, 0x60, 0xC0, 0xFC, 0x00, 0xCC, 0xCC, 0xCC, 0xFC, 0xCC, 0xCC, 0xCC, 0x00,
@@ -1466,7 +1466,7 @@ const uint8 Display::_fontGreek[] = {
0xFC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0x00, 0xF8, 0xCC, 0xCC, 0xF8, 0xC0, 0xC0, 0xC0, 0x00,
0x00, 0x00, 0x18, 0x3C, 0x3C, 0x18, 0x00, 0x00, 0xFC, 0x60, 0x30, 0x18, 0x30, 0x60, 0xFC, 0x00,
0xFC, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0xCC, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x30, 0x00,
- 0x10, 0x7C, 0xD6, 0xD6, 0xD6, 0x7C, 0x10, 0x00, 0xC6, 0x6C, 0x38, 0x10, 0x38, 0x6C, 0xC6, 0x00,
+ 0x10, 0x7C, 0xD6, 0xD6, 0xD6, 0x7C, 0x10, 0x00, 0xC6, 0x6C, 0x38, 0x10, 0x38, 0x6C, 0xC6, 0x00,
0xC6, 0xD6, 0xD6, 0xD6, 0x7C, 0x10, 0x10, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0x78, 0x00, 0xFC, 0x00,
0xBD, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3C, 0x00, 0xB4, 0xCC, 0xCC, 0x78, 0x30, 0x30, 0x30, 0x00,
0x30, 0x00, 0x7A, 0xCC, 0xCC, 0xCC, 0x7A, 0x00, 0x30, 0x00, 0x78, 0xCC, 0x60, 0xCC, 0x78, 0x00,
diff --git a/engines/queen/xref.txt b/engines/queen/xref.txt
index 55067aa922..9e562069e3 100644
--- a/engines/queen/xref.txt
+++ b/engines/queen/xref.txt
@@ -159,7 +159,7 @@ no_check_keys Input::_noCheckKeys
INVENTORY
=========
-DEL_ITEM_NUM() Logic::inventoryDeleteItem
+DEL_ITEM_NUM() Logic::inventoryDeleteItem
INS_ITEM_NUM() Logic::inventoryInsertItem
INVDWN() Logic::inventoryScroll
INVENTORY() Logic::inventoryRefresh
@@ -427,7 +427,7 @@ in() Cutaway::inRange
find_cd_cut() findCdCut
find_cd_desc() *not needed* (included in Logic::joeSpeak)
-
-Kstr
+Kstr
bank9
NEWDEF,
M,A,
@@ -490,7 +490,7 @@ OUTLINE // not needed, textSet() Graphics::parameter
FTOT // queen.c/SETUP_FURNITURE local var
OBJMAXv // == Logic::_objMax[Logic::_currentRoom]
TEMPstr
-WORDstr
+WORDstr
JOE2str,PERSON2str // locals in Talk::initialTalk
SUBJECT
tmpbamflag
diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp
index 81cc2bcf2c..8bc07c55ee 100644
--- a/engines/saga/actor.cpp
+++ b/engines/saga/actor.cpp
@@ -338,9 +338,9 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource
int stateResourceId;
freeActorList();
-
+
_vm->_resource->loadResource(_actorContext, actorsResourceID, actorListData, actorListLength);
-
+
_actorsCount = actorCount;
if (actorListLength != (uint)_actorsCount * ACTOR_INHM_SIZE) {
@@ -348,14 +348,14 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource
}
MemoryReadStream actorS(actorListData, actorListLength);
-
+
_actors = (ActorData **)malloc(_actorsCount * sizeof(*_actors));
for (i = 0; i < _actorsCount; i++) {
actor = _actors[i] = new ActorData();
actor->_id = objectIndexToId(kGameObjectActor, i); //actorIndexToId(i);
actor->_index = i;
debug(4, "init actor id=0x%x index=%d", actor->_id, actor->_index);
- actorS.readUint32LE(); //next displayed
+ actorS.readUint32LE(); //next displayed
actorS.readByte(); //type
actor->_flags = actorS.readByte();
actor->_nameIndex = actorS.readUint16LE();
@@ -450,10 +450,10 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource
}
MemoryReadStream statesIds(idsResourcePointer, idsResourceLength);
-
+
for (i = 0; i < protagStatesCount; i++) {
stateResourceId = statesIds.readUint32LE();
-
+
loadFrameList(stateResourceId, _protagStates[i]._frames, _protagStates[i]._framesCount);
}
free(idsResourcePointer);
@@ -485,20 +485,20 @@ void Actor::loadObjList(int objectCount, int objectsResourceID) {
byte* objectListData;
size_t objectListLength;
freeObjList();
-
+
_vm->_resource->loadResource(_actorContext, objectsResourceID, objectListData, objectListLength);
-
+
_objsCount = objectCount;
MemoryReadStream objectS(objectListData, objectListLength);
-
+
_objs = (ObjectData **)malloc(_objsCount * sizeof(*_objs));
for (i = 0; i < _objsCount; i++) {
object = _objs[i] = new ObjectData();
object->_id = objectIndexToId(kGameObjectObject, i);
object->_index = i;
debug(9, "init object id=%d index=%d", object->_id, object->_index);
- objectS.readUint32LE(); //next displayed
+ objectS.readUint32LE(); //next displayed
objectS.readByte(); //type
object->_flags = objectS.readByte();
object->_nameIndex = objectS.readUint16LE();
@@ -624,7 +624,7 @@ void Actor::setProtagState(int state) {
}
int Actor::getFrameType(ActorFrameTypes frameType) {
-
+
if (_vm->getGameType() == GType_ITE) {
switch (frameType) {
case kFrameStand:
@@ -915,10 +915,10 @@ uint16 Actor::hitTest(const Point &testPoint, bool skipProtagonist) {
// id in this case, even though the chalk was drawn after the circle.
// Therefore, for IHNM, we iterate through the whole draw list and
// return the last match found, not the first one.
- // Unfortunately, it is only possible to search items in the sorted draw
+ // Unfortunately, it is only possible to search items in the sorted draw
// list from start to end, not reverse, so it's necessary to search
// through the whole list to get the item drawn last
-
+
uint16 result = ID_NOTHING;
if (!_vm->_scene->getSceneClip().contains(testPoint))
@@ -1162,7 +1162,7 @@ void Actor::actorSpeech(uint16 actorId, const char **strings, int stringsCount,
// HACK for the compact disk in Ellen's chapter
// Once Ellen starts saying that "Something is different", bring the compact disk in the
- // scene. After speaking with AM, the compact disk is visible. She always says this line
+ // scene. After speaking with AM, the compact disk is visible. She always says this line
// when entering room 59, after speaking with AM, if the compact disk is not picked up yet
// Check Script::sfDropObject for the other part of this hack
if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 3 &&
diff --git a/engines/saga/actor.h b/engines/saga/actor.h
index 4aa1f4508a..c31b78731f 100644
--- a/engines/saga/actor.h
+++ b/engines/saga/actor.h
@@ -298,7 +298,7 @@ public:
Point _screenPosition; // screen coordinates
int32 _screenDepth; //
int32 _screenScale; //
-
+
void saveState(Common::OutSaveFile *out) {
out->writeUint16LE(_flags);
out->writeSint32LE(_nameIndex);
diff --git a/engines/saga/actor_path.cpp b/engines/saga/actor_path.cpp
index 92d7310f16..1a6fff8395 100644
--- a/engines/saga/actor_path.cpp
+++ b/engines/saga/actor_path.cpp
@@ -184,8 +184,8 @@ bool Actor::scanPathLine(const Point &point1, const Point &point2) {
point.x += s.x;
errterm -= fDelta.y;
}
-
- point.y += s.y;
+
+ point.y += s.y;
errterm += fDelta.x;
if (!validPathCellPoint(point)) {
@@ -205,7 +205,7 @@ bool Actor::scanPathLine(const Point &point1, const Point &point2) {
point.y += s.y;
errterm -= fDelta.x;
}
-
+
point.x += s.x;
errterm += fDelta.y;
@@ -381,7 +381,7 @@ int pathLine(Point *pointList, const Point &point1, const Point &point2) {
tempPoint.y = delta.y * 2;
if (delta.y > delta.x) {
-
+
errterm = tempPoint.x - delta.y;
res = delta.y;
diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp
index 0a3cc9aa4f..7e66a67560 100644
--- a/engines/saga/actor_walk.cpp
+++ b/engines/saga/actor_walk.cpp
@@ -208,7 +208,7 @@ void Actor::updateActorsScene(int actorsEntrance) {
if (actor->_flags & kProtagonist) {
actor->_finalTarget = actor->_location;
_centerActor = _protagonist = actor;
- } else if (_vm->getGameType() == GType_ITE &&
+ } else if (_vm->getGameType() == GType_ITE &&
_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) {
continue;
}
@@ -938,7 +938,7 @@ bool Actor::actorWalkTo(uint16 actorId, const Location &toLocation) {
((actor->_currentAction >= kActionWalkToPoint && actor->_currentAction <= kActionWalkDir) ||
(_vm->getGameType() == GType_ITE && actor == _protagonist)) &&
!_vm->_scene->canWalk(pointFrom)) {
-
+
int max = _vm->getGameType() == GType_ITE ? 8 : 4;
for (i = 1; i < max; i++) {
@@ -1109,7 +1109,7 @@ bool Actor::actorEndWalk(uint16 actorId, bool recurse) {
actor->_location.toScreenPointUV(testPoint); // it's wrong calculation, but it is used in ITE
else
actor->_location.toScreenPointXY(testPoint);
-
+
hitZoneIndex = _vm->_scene->_actionMap->hitTest(testPoint);
if (hitZoneIndex != -1) {
hitZone = _vm->_scene->_actionMap->getHitZone(hitZoneIndex);
diff --git a/engines/saga/animation.cpp b/engines/saga/animation.cpp
index 4324496f7d..6690f07bbe 100644
--- a/engines/saga/animation.cpp
+++ b/engines/saga/animation.cpp
@@ -168,7 +168,7 @@ int Anim::playCutaway(int cut, bool fade) {
warning("Could not allocate cutaway animation slot");
return 0;
}
-
+
// Some cutaways in IHNM have animResourceId equal to 0, which means that they only have
// a background frame and no animation. Those animations are actually game scripts.
// An example is the "nightfall" animation in Ben's chapter (fadein-fadeout), the animation
@@ -461,7 +461,7 @@ void Anim::setCycles(uint16 animId, int cycles) {
int Anim::getCycles(uint16 animId) {
if (animId >= MAX_ANIMATIONS && _cutawayAnimations[animId - MAX_ANIMATIONS] == NULL)
return 0;
-
+
return getAnimation(animId)->cycles;
}
@@ -484,7 +484,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) {
return;
if (animId >= MAX_ANIMATIONS && _cutawayAnimations[animId - MAX_ANIMATIONS] == NULL) {
- // In IHNM, cutaways without an animation bit are not rendered, but the framecount
+ // In IHNM, cutaways without an animation bit are not rendered, but the framecount
// needs to be updated
_vm->_frameCount++;
@@ -538,7 +538,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) {
// FIXME: if start > 0, then this works incorrectly
decodeFrame(anim, anim->frameOffsets[frame], displayBuffer, _vm->getDisplayWidth() * _vm->getDisplayHeight());
- _vm->_frameCount++;
+ _vm->_frameCount++;
anim->currentFrame++;
if (anim->completed != 65535) {
anim->completed++;
@@ -547,7 +547,7 @@ void Anim::play(uint16 animId, int vectorTime, bool playing) {
if (anim->currentFrame > anim->maxFrame) {
anim->currentFrame = anim->loopFrame;
- _vm->_frameCount++;
+ _vm->_frameCount++;
if (anim->state == ANIM_STOPPING || anim->currentFrame == -1) {
anim->state = ANIM_PAUSE;
@@ -728,7 +728,7 @@ void Anim::decodeFrame(AnimationData *anim, size_t frameOffset, byte *buf, size_
// Begin RLE decompression to output buffer
- do {
+ do {
markByte = readS.readByte();
switch (markByte) {
case SAGA_FRAME_START:
diff --git a/engines/saga/console.cpp b/engines/saga/console.cpp
index 87e825272d..47b2484547 100644
--- a/engines/saga/console.cpp
+++ b/engines/saga/console.cpp
@@ -117,7 +117,7 @@ bool Console::cmdPlayCutaway(int argc, const char **argv) {
}
bool Console::cmdCurrentScene(int argc, const char **argv) {
- DebugPrintf("Current Scene is: %i, scene resource id: %i\n",
+ DebugPrintf("Current Scene is: %i, scene resource id: %i\n",
_vm->_scene->currentSceneNumber(), _vm->_scene->currentSceneResourceId());
return true;
}
diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp
index f95730eeb7..aeac536af3 100644
--- a/engines/saga/detection.cpp
+++ b/engines/saga/detection.cpp
@@ -58,7 +58,7 @@ const bool SagaEngine::isMacResources() const { return (getPlatform() == Common:
const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; }
const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; }
const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->sfxInfo; }
-const GameSoundInfo *SagaEngine::getMusicInfo() const {
+const GameSoundInfo *SagaEngine::getMusicInfo() const {
static GameSoundInfo musicInfo;
musicInfo.resourceType = kSoundPCM;
musicInfo.frequency = 11025;
@@ -68,7 +68,7 @@ const GameSoundInfo *SagaEngine::getMusicInfo() const {
musicInfo.isBigEndian = false;
musicInfo.isSigned = true;
- return &musicInfo;
+ return &musicInfo;
}
const GameFontDescription *SagaEngine::getFontDescription(int index) {
@@ -89,7 +89,7 @@ uint32 SagaEngine::getFeatures() const {
if (_gf_compressed_sounds)
result |= GF_COMPRESSED_SOUNDS;
- return result;
+ return result;
}
Common::Language SagaEngine::getLanguage() const { return _gameDescription->desc.language; }
diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h
index 0b84669b7f..7a987b6057 100644
--- a/engines/saga/detection_tables.h
+++ b/engines/saga/detection_tables.h
@@ -690,7 +690,7 @@ static const SAGAGameDescription gameDescriptions[] = {
{"scripts.res", GAME_SCRIPTFILE, "be38bbc5a26be809dbf39f13befebd01", -1},
//{"sfx.res", GAME_SOUNDFILE, "1c610d543f32ec8b525e3f652536f269", -1},
// There are two English versions of the game, each one with a different sfx.res file
- // Known MD5 checksums for sfx.res in the English version of the game are
+ // Known MD5 checksums for sfx.res in the English version of the game are
// 1c610d543f32ec8b525e3f652536f269 and 45a9a9f5d37740be24fd2ae2edf36573
{"sfx.res", GAME_SOUNDFILE, NULL, -1},
{ NULL, 0, NULL, 0}
diff --git a/engines/saga/font.cpp b/engines/saga/font.cpp
index 9a0892dbd0..157fed1216 100644
--- a/engines/saga/font.cpp
+++ b/engines/saga/font.cpp
@@ -249,7 +249,7 @@ int Font::getStringWidth(FontId fontId, const char *text, size_t count, FontEffe
int ch;
const byte *txt;
-
+
font = getFont(fontId);
txt = (const byte *) text;
diff --git a/engines/saga/font.h b/engines/saga/font.h
index 92ec5de312..6b930ddca0 100644
--- a/engines/saga/font.h
+++ b/engines/saga/font.h
@@ -141,7 +141,7 @@ class Font {
}
void textDrawRect(KnownFont font, Surface *ds, const char *text, const Common::Rect &rect, int color, int effectColor, FontEffectFlags flags) {
textDrawRect(knownFont2FontIdx(font), ds, text, rect, color, effectColor, flags);
- }
+ }
void setFontMapping(int mapping) {
_fontMapping = mapping;
}
@@ -168,7 +168,7 @@ class Font {
void createOutline(FontData *font);
void draw(FontId fontId, Surface *ds, const char *text, size_t count, const Common::Point &point, int color, int effectColor, FontEffectFlags flags);
void outFont(const FontStyle &drawFont, Surface *ds, const char *text, size_t count, const Common::Point &point, int color, FontEffectFlags flags);
-
+
FontData *getFont(FontId fontId) {
validate(fontId);
return _fonts[fontId];
diff --git a/engines/saga/ihnm_introproc.cpp b/engines/saga/ihnm_introproc.cpp
index eaaff19c94..5f1d0157d5 100644
--- a/engines/saga/ihnm_introproc.cpp
+++ b/engines/saga/ihnm_introproc.cpp
@@ -228,7 +228,7 @@ bool Scene::playTitle(int title, int time, int mode) {
break;
}
}
-
+
if (checkKey()) {
_vm->_scene->cutawaySkip();
interrupted = true;
@@ -244,7 +244,7 @@ bool Scene::playTitle(int title, int time, int mode) {
playParameter = false;
frameTime = curTime;
-
+
_vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0,
backBufferSurface->w, backBufferSurface->h);
}
diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp
index b13bf94650..ef31b85156 100644
--- a/engines/saga/interface.cpp
+++ b/engines/saga/interface.cpp
@@ -69,14 +69,14 @@ static int verbTypeToTextStringsIdLUT[2][kVerbTypeIdsMax] = {
-1,
-1,
-1},
- {-1,
+ {-1,
kVerbIHNMWalk,
kVerbIHNMLookAt,
- kVerbIHNMTake,
- kVerbIHNMUse,
+ kVerbIHNMTake,
+ kVerbIHNMUse,
kVerbIHNMTalkTo,
kVerbIHNMSwallow,
- kVerbIHNMGive,
+ kVerbIHNMGive,
kVerbIHNMPush}
};
@@ -95,7 +95,7 @@ static int IHNMTextStringIdsLUT[56] = {
8, // Give
10, // Options
11, // Test
- 12, //
+ 12, //
13, // Help
14, // Quit Game
16, // Fast
@@ -672,7 +672,7 @@ bool Interface::processAscii(Common::KeyState keystate) {
if (keystate.keycode == Common::KEYCODE_ESCAPE || keystate.keycode == Common::KEYCODE_RETURN) {
_vm->_script->wakeUpThreads(kWaitTypeRequest);
_vm->_interface->setMode(kPanelMain);
-
+
_protectHash = 0;
for (char *p = _textInputString; *p; p++)
@@ -772,7 +772,7 @@ void Interface::draw() {
drawStatusBar();
- if (_panelMode == kPanelMain || _panelMode == kPanelMap ||
+ if (_panelMode == kPanelMain || _panelMode == kPanelMap ||
(_panelMode == kPanelNull && _vm->getGameId() == GID_IHNM_DEMO)) {
_mainPanel.getRect(rect);
backBuffer->blit(rect, _mainPanel.image);
@@ -2336,7 +2336,7 @@ void Interface::drawVerbPanelText(Surface *ds, PanelButton *panelButton, KnownCo
if (_vm->getGameType() == GType_ITE) {
textId = verbTypeToTextStringsIdLUT[0][panelButton->id];
text = _vm->getTextString(textId);
- } else {
+ } else {
textId = verbTypeToTextStringsIdLUT[1][panelButton->id];
text = _vm->_script->_mainStrings.getString(textId + 1);
textShadowKnownColor = kKnownColorTransparent;
@@ -2397,7 +2397,7 @@ bool Interface::converseAddText(const char *text, int strId, int replyId, byte r
for (i = len; i >= 0; i--) {
c = _converseWorkString[i];
-
+
if (_vm->getGameType() == GType_ITE) {
if ((c == ' ' || c == '\0') && (_vm->_font->getStringWidth(kKnownFontSmall, _converseWorkString, i, kFontNormal) <= _vm->getDisplayInfo().converseMaxTextWidth))
break;
@@ -2674,7 +2674,7 @@ void Interface::mapPanelShow() {
rect.left = rect.top = 0;
- _vm->_resource->loadResource(_interfaceContext,
+ _vm->_resource->loadResource(_interfaceContext,
_vm->_resource->convertResourceId(RID_ITE_TYCHO_MAP), resource, resourceLength);
if (resourceLength == 0) {
error("Interface::mapPanelShow() unable to load Tycho map resource");
diff --git a/engines/saga/ite_introproc.cpp b/engines/saga/ite_introproc.cpp
index 0def0f5b22..2aa263b097 100644
--- a/engines/saga/ite_introproc.cpp
+++ b/engines/saga/ite_introproc.cpp
@@ -372,7 +372,7 @@ int Scene::ITEIntroCave1Proc(int param) {
Event event;
Event *q_event;
int lang = 0;
-
+
if (_vm->getLanguage() == Common::DE_DEU)
lang = 1;
else if (_vm->getLanguage() == Common::IT_ITA)
@@ -485,7 +485,7 @@ int Scene::ITEIntroCave2Proc(int param) {
Event event;
Event *q_event;
int lang = 0;
-
+
if (_vm->getLanguage() == Common::DE_DEU)
lang = 1;
else if (_vm->getLanguage() == Common::IT_ITA)
diff --git a/engines/saga/module.mk b/engines/saga/module.mk
index a3765ef01c..c1b1c364f6 100644
--- a/engines/saga/module.mk
+++ b/engines/saga/module.mk
@@ -39,5 +39,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp
index 4158cd84c4..52a6734b8a 100644
--- a/engines/saga/music.cpp
+++ b/engines/saga/music.cpp
@@ -347,7 +347,7 @@ Music::Music(SagaEngine *vm, Audio::Mixer *mixer, MidiDriver *driver, int enable
_currentVolume = 0;
xmidiParser = MidiParser::createParser_XMIDI();
- smfParser = MidiParser::createParser_SMF();
+ smfParser = MidiParser::createParser_SMF();
_digitalMusicContext = _vm->_resource->getContext(GAME_MUSICFILE);
@@ -424,7 +424,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
MidiParser *parser;
ResourceContext *context = NULL;
byte *resourceData;
- size_t resourceSize;
+ size_t resourceSize;
uint32 loopStart;
debug(2, "Music::play %d, %d", resourceId, flags);
@@ -507,7 +507,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) {
context = _vm->_resource->getContext(GAME_MUSICFILE_GM);
if (context == NULL) {
context = _vm->_resource->getContext(GAME_RESOURCEFILE);
- }
+ }
} else {
// I've listened to music from both the FM and the GM
// file, and I've tentatively reached the conclusion
diff --git a/engines/saga/objectmap.cpp b/engines/saga/objectmap.cpp
index ef9bbc935c..c500ccf5ab 100644
--- a/engines/saga/objectmap.cpp
+++ b/engines/saga/objectmap.cpp
@@ -78,7 +78,7 @@ HitZone::HitZone(MemoryReadStreamEndian *readStream, int index, int sceneNumber)
// WORKAROUND: bug #1259608: "ITE: Riff ignores command in Ferret merchant center"
// Apparently ITE Mac version has bug in game data. Both ObjectMap and ActionMap
- // for exit area are little taller (y = 123) and thus Riff goes to exit
+ // for exit area are little taller (y = 123) and thus Riff goes to exit
// when clicked on barrel of nails.
if (sceneNumber == 18 && index == 0 && i == 0 && j == 0 && point->y == 123)
point->y = 129;
diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp
index 71fe937987..23eaa42531 100644
--- a/engines/saga/puzzle.cpp
+++ b/engines/saga/puzzle.cpp
@@ -149,7 +149,7 @@ void Puzzle::initPieces(void) {
int frameNumber;
SpriteList *spriteList;
_vm->_actor->getSpriteParams(puzzle, frameNumber, spriteList);
-
+
for (int i = 0; i < PUZZLE_PIECES; i++) {
spI = &(spriteList->infoList[i]);
_pieceInfo[i].offX = (byte)(spI->width >> 1);
diff --git a/engines/saga/rscfile.cpp b/engines/saga/rscfile.cpp
index 00e9415379..7914b3ed3b 100644
--- a/engines/saga/rscfile.cpp
+++ b/engines/saga/rscfile.cpp
@@ -143,7 +143,7 @@ bool Resource::loadMacContext(ResourceContext *context) {
uint32 macDataOffset;
MacResMap macResMap;
- MacResType *macResTypes;
+ MacResType *macResTypes;
MacResType *macResType;
MacResource *macResource;
@@ -209,7 +209,7 @@ bool Resource::loadMacContext(ResourceContext *context) {
for (i = macResMap.numTypes, macResType = macResTypes; i > 0; i--, macResType++) {
context->file->seek(macResType->offset + macMapOffset + macResMap.typeOffset);
- for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) {
+ for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) {
macResource->id = context->file->readUint16BE();
macResource->nameOffset = context->file->readUint16BE();
macResource->dataOffset = context->file->readUint32BE();
@@ -222,7 +222,7 @@ bool Resource::loadMacContext(ResourceContext *context) {
}
}
- for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) {
+ for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) {
if (macResource->nameOffset != -1) {
context->file->seek(macResource->nameOffset + macMapOffset + macResMap.nameOffset);
macNameLen = context->file->readByte();
@@ -235,7 +235,7 @@ bool Resource::loadMacContext(ResourceContext *context) {
for (i = macResMap.numTypes, macResType = macResTypes; i > 0; i--, macResType++) {
//getting offsets & sizes of midi
if (((context->fileType & GAME_MUSICFILE_GM) > 0) && (macResType->id == ID_MIDI)) {
-
+
context->count = macResType->maxItemId + 1;
context->table = (ResourceData *)calloc(context->count, sizeof(*context->table));
for (j = macResType->items, macResource = macResType->resources; j > 0; j--, macResource++) {
@@ -283,10 +283,10 @@ bool Resource::loadContext(ResourceContext *context) {
if (context->fileType & GAME_SWAPENDIAN)
context->isBigEndian = !context->isBigEndian;
-
+
isMacBinary = (context->fileType & GAME_MACBINARY) > 0;
context->fileType &= ~GAME_MACBINARY;
-
+
if (isMacBinary) {
if (!loadMacContext(context)) {
return false;
@@ -447,7 +447,7 @@ bool Resource::createContexts() {
sprintf(_voicesFileName[0], "voicesd.cmp");
_vm->_gf_compressed_sounds = true;
}
- } else if (Common::File::exists("inherit the earth voices") ||
+ } else if (Common::File::exists("inherit the earth voices") ||
Common::File::exists("inherit the earth voices.cmp")) {
_contextsCount++;
voicesFileIndex = _contextsCount - 1;
@@ -547,7 +547,7 @@ bool Resource::createContexts() {
context->fileType = GAME_MUSICFILE;
} else if (!soundFileInArray && i == soundFileIndex) {
context->fileName = soundFileName;
- context->fileType = GAME_SOUNDFILE;
+ context->fileType = GAME_SOUNDFILE;
} else if (!voicesFileInArray && i == voicesFileIndex) {
context->fileName = _voicesFileName[0];
// can be GAME_VOICEFILE or GAME_SOUNDFILE | GAME_VOICEFILE or GAME_VOICEFILE | GAME_SWAPENDIAN
@@ -740,7 +740,7 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
}
free(_vm->_sndRes->_fxTable);
-
+
_vm->_sndRes->_fxTableLen = resourceLength / 4;
_vm->_sndRes->_fxTable = (FxTable *)malloc(sizeof(FxTable) * _vm->_sndRes->_fxTableLen);
@@ -791,7 +791,7 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) {
}
free(_vm->_music->_songTable);
-
+
_vm->_music->_songTableLen = resourceLength / 4;
_vm->_music->_songTable = (int32 *)malloc(sizeof(int32) * _vm->_music->_songTableLen);
diff --git a/engines/saga/rscfile.h b/engines/saga/rscfile.h
index 765f362489..ee2181ae09 100644
--- a/engines/saga/rscfile.h
+++ b/engines/saga/rscfile.h
@@ -165,7 +165,7 @@ private:
bool loadContext(ResourceContext *context);
bool loadMacContext(ResourceContext *context);
- bool loadSagaContext(ResourceContext *context, uint32 contextOffset, uint32 contextSize);
+ bool loadSagaContext(ResourceContext *context, uint32 contextOffset, uint32 contextSize);
public:
MetaResource _metaResource;
diff --git a/engines/saga/saga.h b/engines/saga/saga.h
index 9b6217ed19..85b1111503 100644
--- a/engines/saga/saga.h
+++ b/engines/saga/saga.h
@@ -445,8 +445,8 @@ enum ColorId {
enum KnownColor {
kKnownColorTransparent,
- kKnownColorBrightWhite,
- kKnownColorWhite,
+ kKnownColorBrightWhite,
+ kKnownColorWhite,
kKnownColorBlack,
kKnownColorSubtitleTextColor,
@@ -655,8 +655,8 @@ private:
public:
ColorId KnownColor2ColorId(KnownColor knownColor);
- void setTalkspeed(int talkspeed);
- int getTalkspeed();
+ void setTalkspeed(int talkspeed);
+ int getTalkspeed();
};
} // End of namespace Saga
diff --git a/engines/saga/sagaresnames.h b/engines/saga/sagaresnames.h
index 99d32a2d13..5bce483c3e 100644
--- a/engines/saga/sagaresnames.h
+++ b/engines/saga/sagaresnames.h
@@ -87,7 +87,7 @@ namespace Saga {
#define RID_ITEDEMO_MAIN_PANEL 2
#define RID_ITEDEMO_CONVERSE_PANEL 3
-#define RID_ITEDEMO_OPTION_PANEL 3 // FIXME: should be 4 but it is an empty resource.
+#define RID_ITEDEMO_OPTION_PANEL 3 // FIXME: should be 4 but it is an empty resource.
#define RID_ITEDEMO_MAIN_SPRITES 5 // Proper fix would be not load options panel when demo is running
#define RID_ITEDEMO_MAIN_PANEL_SPRITES 6
#define RID_ITEDEMO_MAIN_STRINGS 8 //main strings
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index 5390009616..4520c3f406 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -676,9 +676,9 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) {
debug(3, "Loading scene number %d:", _sceneNumber);
if (isNonInteractiveIHNMDemoPart()) {
- // WORKAROUND for the non-interactive part of the IHNM demo: When restarting the
+ // WORKAROUND for the non-interactive part of the IHNM demo: When restarting the
// non-interactive demo, opcode sfMainMode is incorrectly called. Therefore, if any
- // of the scenes of the non-interactive demo are loaded (scenes 144-149), set panel
+ // of the scenes of the non-interactive demo are loaded (scenes 144-149), set panel
// to null and lock the user interface
_vm->_interface->deactivate();
_vm->_interface->setMode(kPanelNull);
diff --git a/engines/saga/script.cpp b/engines/saga/script.cpp
index cf61df8ea8..7664af314f 100644
--- a/engines/saga/script.cpp
+++ b/engines/saga/script.cpp
@@ -665,7 +665,7 @@ void Script::playfieldClick(const Point& mousePoint, bool leftButton) {
doVerb();
return;
}
- } else {
+ } else {
if (_vm->getGameType() == GType_IHNM) {
if ((hitZone->getFlags() & kHitZoneNoWalk) && (_pendingVerb != getVerbType(kVerbWalkTo))) {
doVerb();
@@ -738,8 +738,8 @@ void Script::playfieldClick(const Point& mousePoint, bool leftButton) {
// (screens with Gorrister's heart) in IHNM. For some reason, this zone does
// not have a corresponding action zone, so we auto-use it here, like the exits
// in Benny's chapter
- if (_vm->_scene->currentChapterNumber() == 1 &&
- _vm->_scene->currentSceneNumber() >= 16 &&
+ if (_vm->_scene->currentChapterNumber() == 1 &&
+ _vm->_scene->currentSceneNumber() >= 16 &&
_vm->_scene->currentSceneNumber() <= 19 &&
_pendingVerb == getVerbType(kVerbWalkTo) &&
hitZone != NULL && hitZone->getHitZoneId() == 24576) {
@@ -813,7 +813,7 @@ void Script::whichObject(const Point& mousePoint) {
// Note: for IHNM, the default right button action is "Look at" for actors,
// but "Talk to" makes much more sense
newRightButtonVerb = getVerbType(kVerbTalkTo);
- // Slight hack because of the above change: the jukebox in Gorrister's chapter
+ // Slight hack because of the above change: the jukebox in Gorrister's chapter
// is an actor, so change the right button action to "Look at"
if (_vm->getGameType() == GType_IHNM && objectId == 8199)
newRightButtonVerb = getVerbType(kVerbLookAt);
diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp
index 39ca8ac112..4862ce3be0 100644
--- a/engines/saga/sfuncs.cpp
+++ b/engines/saga/sfuncs.cpp
@@ -840,7 +840,7 @@ void Script::sfDropObject(SCRIPTFUNC_PARAMS) {
obj->_sceneNumber = _vm->_scene->currentSceneNumber();
// HACK for the compact disk in Ellen's chapter
- // Change the scene number of the compact disk so that it's not shown. It will be shown
+ // Change the scene number of the compact disk so that it's not shown. It will be shown
// once Ellen says that there's something different (i.e. after speaking with AM)
// See Actor::actorSpeech for the other part of this hack
if (_vm->getGameType() == GType_IHNM && _vm->_scene->currentChapterNumber() == 3 &&
@@ -982,7 +982,7 @@ void Script::sfCycleFrames(SCRIPTFUNC_PARAMS) {
actor->_actorFlags |= kActorRandom;
}
if (flags & kCycleReverse) {
- if (_vm->getGameType() == GType_IHNM &&
+ if (_vm->getGameType() == GType_IHNM &&
_vm->_scene->currentChapterNumber() == 2 && _vm->_scene->currentSceneNumber() == 41) {
// WORKAROUND: Prevent Benny from walking backwards after talking to the child via the monitor. This
// occurs in the original as well, and is fixed by not setting the kActorBackwards flag at this point
@@ -1728,7 +1728,7 @@ void Script::sfScriptStartCutAway(SCRIPTFUNC_PARAMS) {
thread->pop(); // Not used
int16 fade = thread->pop();
- _vm->_anim->setCutAwayMode(kPanelCutaway);
+ _vm->_anim->setCutAwayMode(kPanelCutaway);
_vm->_anim->playCutaway(cut, fade != 0);
}
@@ -1804,7 +1804,7 @@ void Script::sfShowIHNMDemoHelpBg(SCRIPTFUNC_PARAMS) {
}
void Script::sfAddIHNMDemoHelpTextLine(SCRIPTFUNC_PARAMS) {
- int stringId = thread->pop();
+ int stringId = thread->pop();
TextListEntry textEntry;
Event event;
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index 9f8a155e32..d6114b3fc4 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -172,7 +172,7 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
} else {
soundInfo = _vm->getSfxInfo();
}
-
+
context->table[resourceId].fillSoundPatch(soundInfo);
MemoryReadStream readS(soundResource, soundResourceLength);
@@ -184,8 +184,8 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
resourceType = kSoundVOC;
} else if (!memcmp(soundResource, "RIFF", 4) != 0) {
resourceType = kSoundWAV;
- }
-
+ }
+
bool uncompressedSound = false;
// If patch data exists for sound resource 4 (used in ITE intro), don't treat this sound as compressed
// Patch data for this resource is in file p2_a.iaf or p2_a.voc
diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp
index 34b54e30f9..b5c675a403 100644
--- a/engines/saga/sprite.cpp
+++ b/engines/saga/sprite.cpp
@@ -120,7 +120,7 @@ void Sprite::loadList(int resourceId, SpriteList &spriteList) {
if (offset >= spriteListLength) {
// ITE Mac demos throw this warning
warning("Sprite::loadList offset exceeded");
- return;
+ return;
}
spritePointer = spriteListData;
diff --git a/engines/saga/xref.txt b/engines/saga/xref.txt
index 1d3aff0824..ea775f5b2e 100644
--- a/engines/saga/xref.txt
+++ b/engines/saga/xref.txt
@@ -9,7 +9,7 @@ Watcom C++ arguments order:
Sceneres.h
==========
- LOADREQ_FIGURE
+ LOADREQ_FIGURE
LOADREQ_OBJECT
LOADREQ_BACKGROUND SAGA_BG_IMAGE
LOADREQ_ZBUF SAGA_BG_MASK
diff --git a/engines/scumm/cursor.cpp b/engines/scumm/cursor.cpp
index 899f920247..0d0e7b054b 100644
--- a/engines/scumm/cursor.cpp
+++ b/engines/scumm/cursor.cpp
@@ -163,7 +163,7 @@ void ScummEngine_v70he::setCursorFromImg(uint img, uint room, uint imgindex) {
void ScummEngine_v70he::setDefaultCursor() {
const uint16 *src;
int i, j;
- static const byte palette[] = {0, 0, 0, 0,
+ static const byte palette[] = {0, 0, 0, 0,
0xff, 0xff, 0xff, 0,
0, 0, 0, 0};
diff --git a/engines/scumm/detection.h b/engines/scumm/detection.h
index bc67aafb7e..26f6be8fec 100644
--- a/engines/scumm/detection.h
+++ b/engines/scumm/detection.h
@@ -39,7 +39,7 @@ struct GameSettings {
* The gameid of this game.
*/
const char *gameid;
-
+
/**
* An identifier which can be used to distinguish game variants.
* This string is also used to augment the description string
@@ -51,13 +51,13 @@ struct GameSettings {
* variant. Failing to obey this rule can lead to odd bugs.
*/
const char *variant;
-
+
/**
* An optional string that will be added to the 'preferredtarget'
* computed by the detector.
*/
const char *preferredTag;
-
+
/**
* The numerical gameid of this game.
* This is not in one-to-one correspondence with the gameid above.
@@ -72,16 +72,16 @@ struct GameSettings {
/** The HE subversion. */
byte heversion;
-
+
/** MidiDriverFlags values */
int midi;
-
+
/**
* Bitmask obtained by ORing various GameFeatures enums, and used
* to en-/disable certain features of this game variant.
*/
uint32 features;
-
+
/**
* Platform indicator, this is set to a value different from
* kPlatformUnknown if this game variant only existed for this
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 8977bc108f..e008ce2179 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -981,7 +981,7 @@ void DebugInputDialog::handleKeyDown(Common::KeyState state) {
draw();
reflowLayout();
setInfoText(total);
- }
+ }
}
} // End of namespace Scumm
diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h
index b4cf8b1f85..7c99a0ebcc 100644
--- a/engines/scumm/dialogs.h
+++ b/engines/scumm/dialogs.h
@@ -124,7 +124,7 @@ protected:
int _page;
int _numPages;
-
+
const GameSettings _game;
void displayKeyBindings();
@@ -251,7 +251,7 @@ public:
protected:
int _value;
uint32 _timer;
-
+
void cycleValue();
};
diff --git a/engines/scumm/file_nes.cpp b/engines/scumm/file_nes.cpp
index 88b4253a1d..95f5eec4ea 100644
--- a/engines/scumm/file_nes.cpp
+++ b/engines/scumm/file_nes.cpp
@@ -471,7 +471,7 @@ static const ScummNESFile::Resource res_scripts_esp[179] = {
{ 0x247C5, 0x0027, NES_SCRIPT }, { 0x1A08C, 0x004E, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2B21B, 0x00A5, NES_SCRIPT }, { 0x2A0D1, 0x00B1, NES_SCRIPT },
{ 0x2A182, 0x0140, NES_SCRIPT }, { 0x197CF, 0x00BE, NES_SCRIPT }, { 0x1988D, 0x014D, NES_SCRIPT }, { 0x199DA, 0x0012, NES_SCRIPT }, { 0x2A2C2, 0x0005, NES_SCRIPT },
{ 0x2A2C7, 0x0005, NES_SCRIPT }, { 0x2A2CC, 0x0005, NES_SCRIPT }, { 0x2A2D1, 0x0005, NES_SCRIPT }, { 0x2A2D6, 0x0005, NES_SCRIPT }, { 0x216E8, 0x0033, NES_SCRIPT },
- { 0x2A2DB, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A2E0, 0x009C, NES_SCRIPT }, { 0x2A37C, 0x009C, NES_SCRIPT }
+ { 0x2A2DB, 0x0005, NES_SCRIPT }, { 0x00000, 0x0000, NES_SCRIPT }, { 0x2A2E0, 0x009C, NES_SCRIPT }, { 0x2A37C, 0x009C, NES_SCRIPT }
};
static const ScummNESFile::Resource *res_scripts[ScummNESFile::kROMsetNum] = {
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 27b24ac23c..f28cbb3548 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -263,7 +263,7 @@ void GdiV1::roomChanged(byte *roomptr) {
decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 12), _C64.picMap, roomptr[4] * roomptr[5]);
decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 14), _C64.colorMap, roomptr[4] * roomptr[5]);
decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 16), _C64.maskMap, roomptr[4] * roomptr[5]);
-
+
// Read the mask data. The 16bit length value seems to always be 8 too big.
// See bug #1837375 for details on this.
const byte *maskPtr = roomptr + READ_LE_UINT16(roomptr + 18);
diff --git a/engines/scumm/he/animation_he.h b/engines/scumm/he/animation_he.h
index d93c1317d7..1d04c3e5df 100644
--- a/engines/scumm/he/animation_he.h
+++ b/engines/scumm/he/animation_he.h
@@ -47,7 +47,7 @@ class MoviePlayer : public Graphics::DXAPlayer {
char baseName[40];
uint32 _flags;
uint32 _wizResNum;
-
+
public:
MoviePlayer(ScummEngine_v90he *vm, Audio::Mixer *mixer);
diff --git a/engines/scumm/he/resource_he.h b/engines/scumm/he/resource_he.h
index 5e7a6bb96b..08f9a8108a 100644
--- a/engines/scumm/he/resource_he.h
+++ b/engines/scumm/he/resource_he.h
@@ -181,7 +181,7 @@ class Win32ResExtractor : public ResExtractor {
int level;
bool numeric_id;
bool is_directory;
-
+
char *get_resource_id_quoted();
} PACKED_STRUCT;
diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp
index a3b1fd2c6b..c03be592d6 100644
--- a/engines/scumm/he/script_v72he.cpp
+++ b/engines/scumm/he/script_v72he.cpp
@@ -1709,7 +1709,7 @@ void ScummEngine_v72he::o72_openFile() {
int ScummEngine_v72he::readFileToArray(int slot, int32 size) {
writeVar(0, 0);
byte *data = defineArray(0, kByteArray, 0, 0, 0, size);
-
+
if (slot != -1) {
_hInFileTable[slot]->read(data, size + 1);
}
diff --git a/engines/scumm/he/sound_he.h b/engines/scumm/he/sound_he.h
index 5ee1f9e0b9..47ff145e6b 100644
--- a/engines/scumm/he/sound_he.h
+++ b/engines/scumm/he/sound_he.h
@@ -61,7 +61,7 @@ public: // Used by createSound()
public:
SoundHE(ScummEngine *parent, Audio::Mixer *mixer);
~SoundHE();
-
+
virtual void addSoundToQueue(int sound, int heOffset = 0, int heChannel = 0, int heFlags = 0);
virtual void addSoundToQueue2(int sound, int heOffset = 0, int heChannel = 0, int heFlags = 0);
diff --git a/engines/scumm/imuse_digi/dimuse_track.cpp b/engines/scumm/imuse_digi/dimuse_track.cpp
index a1a41ef251..d3c61a6a80 100644
--- a/engines/scumm/imuse_digi/dimuse_track.cpp
+++ b/engines/scumm/imuse_digi/dimuse_track.cpp
@@ -93,7 +93,7 @@ void IMuseDigital::startSound(int soundId, const char *soundName, int soundType,
debug(5, "IMuseDigital::startSound(%d, trackId:%d)", soundId, l);
Track *track = _track[l];
-
+
// Reset the track
memset(track, 0, sizeof(Track));
diff --git a/engines/scumm/imuse_digi/dimuse_track.h b/engines/scumm/imuse_digi/dimuse_track.h
index e613798569..0c6445c43a 100644
--- a/engines/scumm/imuse_digi/dimuse_track.h
+++ b/engines/scumm/imuse_digi/dimuse_track.h
@@ -81,7 +81,7 @@ struct Track {
Track() : soundId(-1), used(false), stream(NULL) {
}
-
+
int getPan() const { return (pan != 64) ? 2 * pan - 127 : 0; }
int getVol() const { return vol / 1000; }
Audio::Mixer::SoundType getType() const {
diff --git a/engines/scumm/intern.h b/engines/scumm/intern.h
index 3339780991..c693787e83 100644
--- a/engines/scumm/intern.h
+++ b/engines/scumm/intern.h
@@ -61,7 +61,7 @@ protected:
uint16 xStrips, yStrips;
bool isDrawn;
} _flashlight;
-
+
char _saveLoadVarsFilename[256];
public:
@@ -283,7 +283,7 @@ protected:
V2MouseoverBox _mouseOverBoxesV2[7];
int8 _mouseOverBoxV2;
-
+
char _sentenceBuf[256];
int _activeInventory;
@@ -568,7 +568,7 @@ protected:
int16 xpos, ypos;
byte color;
byte charset;
- byte text[256];
+ byte text[256];
};
/** BlastObjects to draw */
@@ -879,7 +879,7 @@ public:
char tag[12+1];
int32 offset;
};
-
+
protected:
int _verbLineSpacing;
bool _existLanguageFile;
@@ -893,7 +893,7 @@ protected:
int16 xpos, ypos;
byte color;
byte charset;
- byte text[256];
+ byte text[256];
bool actorSpeechMsg;
};
#else
diff --git a/engines/scumm/module.mk b/engines/scumm/module.mk
index 47c1a9e55c..3a50bcab8c 100644
--- a/engines/scumm/module.mk
+++ b/engines/scumm/module.mk
@@ -120,5 +120,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/scumm/object.h b/engines/scumm/object.h
index f27e6a501e..2a817b2b88 100644
--- a/engines/scumm/object.h
+++ b/engines/scumm/object.h
@@ -45,7 +45,7 @@ enum ObjectStateV2 {
// FIXME: Not quite sure how to name state 8. It seems to mark some kind
// of "activation state" for the given object. E.g. is a door open?
// Is a drawer extended? In addition it is used to toggle the look
- // of objects that the user can "pick up" (i.e. it is set in
+ // of objects that the user can "pick up" (i.e. it is set in
// o2_pickupObject together with kObjectStateUntouchable). So in a sense,
// it can also mean "invisible" in some situations.
kObjectState_08 = 8
diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp
index 07b4141620..fac3ad9975 100644
--- a/engines/scumm/saveload.cpp
+++ b/engines/scumm/saveload.cpp
@@ -597,10 +597,10 @@ void ScummEngine::saveInfos(Common::OutSaveFile* file) {
// still save old format for older versions
section.timeTValue = time(0);
section.playtime = _system->getMillis() / 1000 - _engineStartTime;
-
+
tm curTime;
_system->getTimeAndDate(curTime);
-
+
section.date = (curTime.tm_mday & 0xFF) << 24 | ((curTime.tm_mon + 1) & 0xFF) << 16 | (curTime.tm_year + 1900) & 0xFFFF;
section.time = (curTime.tm_hour & 0xFF) << 8 | (curTime.tm_min) & 0xFF;
@@ -1257,7 +1257,7 @@ void ScummEngine_v7::saveOrLoad(Serializer *s) {
s->saveLoadArrayOf(_subtitleQueue, ARRAYSIZE(_subtitleQueue), sizeof(_subtitleQueue[0]), subtitleQueueEntries);
s->saveLoadEntries(this, V7Entries);
-
+
if (s->getVersion() <= VER(68) && s->isLoading()) {
// WORKAROUND bug #1846049: Reset the default charset color to a sane value.
_string[0]._default.charset = 1;
diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp
index 599d70f280..2d195026ef 100644
--- a/engines/scumm/script_v6.cpp
+++ b/engines/scumm/script_v6.cpp
@@ -2384,7 +2384,7 @@ void ScummEngine_v6::o6_talkActor() {
_forcedWaitForMessage = false;
_scriptPointer += resStrLen(_scriptPointer) + 1;
-
+
return;
}
diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h
index fa86dec650..41f7784d36 100644
--- a/engines/scumm/scumm.h
+++ b/engines/scumm/scumm.h
@@ -391,7 +391,7 @@ public:
void increaseResourceCounter();
void resourceStats();
-
+
//protected:
bool validateResource(const char *str, int type, int index) const;
protected:
@@ -434,7 +434,7 @@ public:
protected:
VirtualMachineState vm;
-
+
bool _oldSoundsPaused;
public:
@@ -474,7 +474,7 @@ protected:
virtual void scummLoop_handleActors() = 0;
virtual void scummLoop_handleEffects();
virtual void scummLoop_handleSound();
-
+
virtual void runBootscript();
// Event handling
diff --git a/engines/scumm/sound.cpp b/engines/scumm/sound.cpp
index c27b34eb62..ae337030e1 100644
--- a/engines/scumm/sound.cpp
+++ b/engines/scumm/sound.cpp
@@ -394,7 +394,7 @@ void Sound::playSound(int soundID) {
*/
}
else if ((_vm->_game.platform == Common::kPlatformMacintosh) && (_vm->_game.id == GID_INDY3) && (ptr[26] == 0)) {
- // Sound fomat as used in Indy3 EGA Mac.
+ // Sound fomat as used in Indy3 EGA Mac.
// It seems to be closely related to the Amiga format, see player_v3a.cpp
// The following is known:
// offset 0, 16 LE: total size
@@ -424,7 +424,7 @@ void Sound::playSound(int soundID) {
if (loopcount > 1) {
// TODO: We can only loop once, or infinitely many times, but
// have no support for a finite number of repetitions.
- // This is
+ // This is
loopStart = READ_BE_UINT16(ptr + 10) - READ_BE_UINT16(ptr + 8);
loopEnd = READ_BE_UINT16(ptr + 14);
flags |= Audio::Mixer::FLAG_LOOP;
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index cfc6afed7a..0648b7a641 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -635,7 +635,7 @@ void ScummEngine_v2::checkExecVerbs() {
}
}
}
-
+
// Generic keyboard input
runInputScript(4, _mouseAndKeyboardStat, 1);
} else if (_mouseAndKeyboardStat & MBS_MOUSE_MASK) {
diff --git a/engines/sky/module.mk b/engines/sky/module.mk
index 7d53615bd0..67b3b19e5d 100644
--- a/engines/sky/module.mk
+++ b/engines/sky/module.mk
@@ -28,5 +28,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/sky/music/adlibchannel.h b/engines/sky/music/adlibchannel.h
index d73de0b0de..67c0b5d176 100644
--- a/engines/sky/music/adlibchannel.h
+++ b/engines/sky/music/adlibchannel.h
@@ -78,7 +78,7 @@ private:
uint8 *_instrumentMap;
uint8 *_registerTable, *_opOutputTable;
uint8 *_adlibRegMirror;
-
+
// normal subs
void setRegister(uint8 regNum, uint8 value);
int32 getNextEventTime(void);
@@ -87,7 +87,7 @@ private:
void setupInstrument(uint8 opcode);
void setupChannelVolume(uint8 volume);
void stopNote(void);
-
+
// Streamfunctions from Command90hTable
void com90_caseNoteOff(void); // 0
void com90_stopChannel(void); // 1
diff --git a/engines/sky/music/gmchannel.cpp b/engines/sky/music/gmchannel.cpp
index d7d2ba854b..fc35fed391 100644
--- a/engines/sky/music/gmchannel.cpp
+++ b/engines/sky/music/gmchannel.cpp
@@ -119,7 +119,7 @@ uint8 GmChannel::process(uint16 aktTime) {
case 11: com90_getChannelPanValue(); break;
case 12: com90_setLoopPoint(); break;
case 13: com90_getChannelControl(); break;
-
+
default:
error("GmChannel: Unknown music opcode 0x%02X", opcode);
break;
diff --git a/engines/sky/music/mt32music.cpp b/engines/sky/music/mt32music.cpp
index 2be19a0651..aa784e7437 100644
--- a/engines/sky/music/mt32music.cpp
+++ b/engines/sky/music/mt32music.cpp
@@ -102,10 +102,10 @@ bool MT32Music::processPatchSysEx(uint8 *sysExData) {
return false;
// decompress data from stream
- sysExBuf[ 0] = 0x41;
- sysExBuf[ 1] = 0x10;
- sysExBuf[ 2] = 0x16;
- sysExBuf[ 3] = 0x12;
+ sysExBuf[ 0] = 0x41;
+ sysExBuf[ 1] = 0x10;
+ sysExBuf[ 2] = 0x16;
+ sysExBuf[ 3] = 0x12;
sysExBuf[ 4] = 0x5;
sysExBuf[ 5] = sysExData[0] >> 4; // patch offset part 1
sysExBuf[ 6] = (sysExData[0] & 0xF) << 3; // patch offset part 2
diff --git a/engines/sky/music/musicbase.cpp b/engines/sky/music/musicbase.cpp
index b6ea150d94..9bf7a62a21 100644
--- a/engines/sky/music/musicbase.cpp
+++ b/engines/sky/music/musicbase.cpp
@@ -146,10 +146,10 @@ void MusicBase::startMusic(uint16 param) {
_onNextPoll.musicToProcess = param & 0xF;
}
-uint8 MusicBase::giveVolume(void) {
- return (uint8)_musicVolume;
+uint8 MusicBase::giveVolume(void) {
+ return (uint8)_musicVolume;
}
-
+
uint8 MusicBase::giveCurrentMusic(void) {
return _currentMusic;
}
diff --git a/engines/sword1/animation.h b/engines/sword1/animation.h
index db3ea75fd9..0837814c69 100644
--- a/engines/sword1/animation.h
+++ b/engines/sword1/animation.h
@@ -132,9 +132,9 @@ protected:
void updateScreen(void);
};
-#endif
+#endif
-#ifdef USE_MPEG2
+#ifdef USE_MPEG2
class AnimationState : public Graphics::BaseAnimationState {
private:
diff --git a/engines/sword1/module.mk b/engines/sword1/module.mk
index 5db32e57c1..1ee62af853 100644
--- a/engines/sword1/module.mk
+++ b/engines/sword1/module.mk
@@ -25,5 +25,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/sword1/resman.h b/engines/sword1/resman.h
index 2bd3955db5..a0a8bb6c4c 100644
--- a/engines/sword1/resman.h
+++ b/engines/sword1/resman.h
@@ -78,7 +78,7 @@ public:
Header *lockScript(uint32 scrID);
void unlockScript(uint32 scrID);
FrameHeader *fetchFrame(void *resourceData, uint32 frameNo);
-
+
uint16 getUint16(uint16 value) {
return (_isBigEndian) ? FROM_BE_16(value): FROM_LE_16(value);
}
diff --git a/engines/sword2/header.h b/engines/sword2/header.h
index 3e4cc0a6ae..5100e43de1 100644
--- a/engines/sword2/header.h
+++ b/engines/sword2/header.h
@@ -183,7 +183,7 @@ struct AnimHeader {
writeS.writeByte(feetEndDir);
writeS.writeUint16LE(blend);
}
-
+
};
// runtimeComp - compression used on each frame of the anim
diff --git a/engines/sword2/module.mk b/engines/sword2/module.mk
index 25d73ab775..3b21023fa8 100644
--- a/engines/sword2/module.mk
+++ b/engines/sword2/module.mk
@@ -38,5 +38,5 @@ ifdef BUILD_PLUGINS
PLUGIN := 1
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/engines/sword2/mouse.h b/engines/sword2/mouse.h
index c7d90cc6fe..09ac9ced20 100644
--- a/engines/sword2/mouse.h
+++ b/engines/sword2/mouse.h
@@ -76,7 +76,7 @@ enum {
#define RDMENU_MAXPOCKETS 15
#define MOUSE_ANIM_HEADER_SIZE 6
-
+
struct MouseAnim {
uint8 runTimeComp; // type of runtime compression used for the
// frame data
diff --git a/engines/sword2/object.h b/engines/sword2/object.h
index ce894e287b..7ee8766105 100644
--- a/engines/sword2/object.h
+++ b/engines/sword2/object.h
@@ -280,7 +280,7 @@ public:
// walk-data structure - contains details of layout of frames in the
// mega-set, and how they are to be used
-struct ObjectWalkdata {
+struct ObjectWalkdata {
int32 nWalkFrames; // no. of frames per walk-cycle
int32 usingStandingTurnFrames; // 0 = no 1 = yes
int32 usingWalkingTurnFrames; // 0 = no 1 = yes
diff --git a/graphics/colormasks.h b/graphics/colormasks.h
index b8bfe26535..5b9f0517a9 100644
--- a/graphics/colormasks.h
+++ b/graphics/colormasks.h
@@ -33,7 +33,7 @@ struct ColorMasks {
/*
The ColorMasks template can be used to map bit format values
(like 555, 565, 1555, 4444) to corresponding bit masks and shift values.
-Currently this is only meant for
+Currently this is only meant for
The meaning of these is masks is the following:
kBytesPerPixel
@@ -41,17 +41,17 @@ The meaning of these is masks is the following:
kRedMask, kGreenMask, kBlueMask
-> bitmask, and this with the color to select only the bits of the corresponding color
-
+
The k*Bits and k*Shift values can be used to extract R,G,B. I.e. to get
the red color component of a pixel, as a 8-bit value, you would write
-
+
R = ((color & kRedMask) >> kRedShift) << (8-kRedBits)
-
+
Actually, instead of the simple left shift, one might want to use somewhat
- more sophisticated code (which fills up the least significant bits with
+ more sophisticated code (which fills up the least significant bits with
appropriate data).
-
-
+
+
The highBits / lowBits / qhighBits / qlowBits are special values that are
used in the super-optimized interpolation functions in scaler/intern.h
and scaler/aspect.cpp. Currently they are only available in 555 and 565 mode.
diff --git a/graphics/module.mk b/graphics/module.mk
index 4ab8b1450e..93e2db26c5 100644
--- a/graphics/module.mk
+++ b/graphics/module.mk
@@ -41,5 +41,5 @@ endif
endif
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/graphics/scaler.cpp b/graphics/scaler.cpp
index e492a8a58b..0afe756034 100644
--- a/graphics/scaler.cpp
+++ b/graphics/scaler.cpp
@@ -78,10 +78,10 @@ template<class T>
void InitLUT() {
int r, g, b;
int Y, u, v;
-
+
assert(T::kBytesPerPixel == 2);
- // Allocate the YUV/LUT buffers on the fly if needed.
+ // Allocate the YUV/LUT buffers on the fly if needed.
if (RGBtoYUV == 0)
RGBtoYUV = (uint32 *)malloc(65536 * sizeof(uint32));
if (LUT16to32 == 0)
diff --git a/graphics/scaler/hq2x_i386.asm b/graphics/scaler/hq2x_i386.asm
index ee8cd4d8b3..cc0f306c14 100644
--- a/graphics/scaler/hq2x_i386.asm
+++ b/graphics/scaler/hq2x_i386.asm
@@ -503,31 +503,31 @@ _hq2x_16:
mov ebx,[nextline]
movq mm7,[esi+ebx-2]
movd eax,mm5
- movzx edx,ax
+ movzx edx,ax
mov [w1],edx
shr eax,16
mov [w2],eax
psrlq mm5,32
movd eax,mm5
- movzx edx,ax
+ movzx edx,ax
mov [w3],edx
movd eax,mm6
- movzx edx,ax
+ movzx edx,ax
mov [w4],edx
shr eax,16
mov [w5],eax
psrlq mm6,32
movd eax,mm6
- movzx edx,ax
+ movzx edx,ax
mov [w6],edx
movd eax,mm7
- movzx edx,ax
+ movzx edx,ax
mov [w7],edx
shr eax,16
mov [w8],eax
psrlq mm7,32
movd eax,mm7
- movzx edx,ax
+ movzx edx,ax
mov [w9],edx
.flags
mov ebx,[_RGBtoYUV]
diff --git a/graphics/scaler/hq3x_i386.asm b/graphics/scaler/hq3x_i386.asm
index 3b84c6c988..523d06a2a4 100644
--- a/graphics/scaler/hq3x_i386.asm
+++ b/graphics/scaler/hq3x_i386.asm
@@ -317,7 +317,7 @@ SECTION .text
%macro PIXEL12_3 0
Interp3 [edi+ebx+4],[w6]
-%endmacro
+%endmacro
%macro PIXEL12_6 0
Interp1 [edi+ebx+4],[w6],eax
@@ -441,31 +441,31 @@ _hq3x_16:
mov ebx,[nextline]
movq mm7,[esi+ebx-2]
movd eax,mm5
- movzx edx,ax
+ movzx edx,ax
mov [w1],edx
shr eax,16
mov [w2],eax
psrlq mm5,32
movd eax,mm5
- movzx edx,ax
+ movzx edx,ax
mov [w3],edx
movd eax,mm6
- movzx edx,ax
+ movzx edx,ax
mov [w4],edx
shr eax,16
mov [w5],eax
psrlq mm6,32
movd eax,mm6
- movzx edx,ax
+ movzx edx,ax
mov [w6],edx
movd eax,mm7
- movzx edx,ax
+ movzx edx,ax
mov [w7],edx
shr eax,16
mov [w8],eax
psrlq mm7,32
movd eax,mm7
- movzx edx,ax
+ movzx edx,ax
mov [w9],edx
.flags
mov ebx,[_RGBtoYUV]
diff --git a/gui/ThemeClassic.cpp b/gui/ThemeClassic.cpp
index b178b4b8df..be17cf0d09 100644
--- a/gui/ThemeClassic.cpp
+++ b/gui/ThemeClassic.cpp
@@ -173,7 +173,7 @@ int ThemeClassic::getTabPadding() const {
void ThemeClassic::drawDialogBackground(const Common::Rect &r, uint16 hints, WidgetStateInfo state) {
if (!_initOk)
return;
-
+
restoreBackground(r);
#ifndef CT_NO_TRANSPARENCY
@@ -260,7 +260,7 @@ void ThemeClassic::drawSurface(const Common::Rect &r, const Graphics::Surface &s
if (!rect.isValidRect())
return;
-
+
assert(surface.bytesPerPixel == sizeof(OverlayColor));
OverlayColor *src = (OverlayColor *)surface.pixels;
@@ -384,7 +384,7 @@ void ThemeClassic::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, c
box(r.left + i * tabWidth, r.top+2, tabWidth, tabHeight-2, _color, _shadowcolor);
_font->drawString(&_screen, tabs[i], r.left + i * tabWidth, r.top+4, tabWidth, getColor(state), Graphics::kTextAlignCenter, 0, true);
}
-
+
if (active >= 0) {
box(r.left + active * tabWidth, r.top, tabWidth, tabHeight, _color, _shadowcolor, true);
_font->drawString(&_screen, tabs[active], r.left + active * tabWidth, r.top+titleVPad, tabWidth, getColor(kStateHighlight), Graphics::kTextAlignCenter, 0, true);
@@ -395,7 +395,7 @@ void ThemeClassic::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, c
_screen.vLine(r.left, r.top + tabHeight, r.bottom - 1, _color);
_screen.vLine(r.right - 1, r.top + tabHeight, r.bottom - 1, _shadowcolor);
}
-
+
addDirtyRect(r);
}
@@ -601,7 +601,7 @@ void ThemeClassic::blendScreenToDialog() {
b = ab * a;
OverlayColor *ptr = (OverlayColor*)_dialog->screen.getBasePtr(rect.left, rect.top);
-
+
int h = rect.height();
int w = rect.width();
while (h--) {
@@ -624,7 +624,7 @@ void ThemeClassic::blendScreenToDialog() {
b = ab * 3;
OverlayColor *ptr = (OverlayColor*)_dialog->screen.getBasePtr(rect.left, rect.top);
-
+
int h = rect.height();
int w = rect.width();
@@ -691,7 +691,7 @@ bool ThemeClassic::loadConfig() {
temp.clear();
temp = _evaluator->getStringVar("font");
if (temp.empty() || 0 == temp.compareToIgnoreCase("builtin")) {
- if (!_fontName.empty())
+ if (!_fontName.empty())
delete _font;
_fontName.clear();
} else if (temp != _fontName) {
diff --git a/gui/ThemeClassic.h b/gui/ThemeClassic.h
index 0450da5aee..12dc8d8068 100644
--- a/gui/ThemeClassic.h
+++ b/gui/ThemeClassic.h
@@ -50,7 +50,7 @@ public:
void clearAll();
void updateScreen();
-
+
void resetDrawArea();
const Graphics::Font *getFont(FontStyle font) const { return _font; }
diff --git a/gui/ThemeModern.cpp b/gui/ThemeModern.cpp
index 99244b85f5..69595eb219 100644
--- a/gui/ThemeModern.cpp
+++ b/gui/ThemeModern.cpp
@@ -141,7 +141,7 @@ bool ThemeModern::init() {
processExtraValues();
}
-
+
for (int i = 0; i < kImageHandlesMax; ++i) {
if (!_images[i]) {
return false;
@@ -166,7 +166,7 @@ void ThemeModern::refresh() {
_system->showOverlay();
CursorMan.replaceCursorPalette(_cursorPal, 0, MAX_CURS_COLORS);
CursorMan.replaceCursor(_cursor, _cursorWidth, _cursorHeight, _cursorHotspotX, _cursorHotspotY, 255, _cursorTargetScale);
- }
+ }
}
void ThemeModern::enable() {
@@ -196,7 +196,7 @@ void ThemeModern::openDialog(bool topDialog) {
// first dialog
_dialog->screen.create(_screen.w, _screen.h, sizeof(OverlayColor));
}
-
+
if (_dialogShadingCallback && topDialog) {
OverlayColor *col = (OverlayColor*)_screen.pixels;
for (int y = 0; y < _screen.h; ++y) {
@@ -206,9 +206,9 @@ void ThemeModern::openDialog(bool topDialog) {
col += _screen.w;
}
}
-
+
memcpy(_dialog->screen.pixels, _screen.pixels, _screen.pitch*_screen.h);
-
+
if ((_dialogShadingCallback) && topDialog)
addDirtyRect(Common::Rect(0, 0, _screen.w, _screen.h), false, false);
}
@@ -252,7 +252,7 @@ void ThemeModern::resetDrawArea() {
}
#define surface(x) (_images[x])
-
+
void ThemeModern::drawDialogBackground(const Common::Rect &r, uint16 hints, WidgetStateInfo state) {
if (!_initOk)
return;
@@ -319,7 +319,7 @@ void ThemeModern::drawWidgetBackground(const Common::Rect &r, uint16 hints, Widg
return;
Common::Rect r2;
-
+
ImageHandles corner, top, left, bkgd;
ShadowStyles shadow;
ColorHandles start, end;
@@ -394,7 +394,7 @@ void ThemeModern::drawWidgetBackground(const Common::Rect &r, uint16 hints, Widg
void ThemeModern::drawButton(const Common::Rect &r, const Common::String &str, WidgetStateInfo state, uint16 hints) {
if (!_initOk)
return;
-
+
Common::Rect r2 = shadowRect(r, kShadowButton);
if (!(hints & THEME_HINT_NO_BACKGROUND_RESTORE) || state == kStateDisabled)
@@ -446,7 +446,7 @@ void ThemeModern::drawSurface(const Common::Rect &r, const Graphics::Surface &su
if (!rect.isValidRect())
return;
-
+
assert(surface.bytesPerPixel == sizeof(OverlayColor));
if (alpha != 256)
@@ -499,7 +499,7 @@ void ThemeModern::drawSlider(const Common::Rect &rr, int width, WidgetStateInfo
if (r2.right > r.right) {
r2.right = r.right;
}
-
+
drawShadow(r2, surface(kButtonBkgdCorner), surface(kButtonBkgdTop), surface(kButtonBkgdLeft), surface(kButtonBkgd), kShadowButton);
OverlayColor start, end;
@@ -565,7 +565,7 @@ void ThemeModern::drawCheckbox(const Common::Rect &r, const Common::String &str,
const Graphics::Surface *checkBox = surface(checked ? kCheckboxChecked : kCheckboxEmpty);
int checkBoxSize = checkBox->w;
-
+
restoreBackground(Common::Rect(r.left, r.top, r.left+checkBox->w, r.top+checkBox->h));
drawSurface(Common::Rect(r.left, r.top, r.left+checkBox->w, r.top+checkBox->h), checkBox, false, false, (state == kStateDisabled) ? 128 : 256);
@@ -586,7 +586,7 @@ void ThemeModern::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, co
drawRectMasked(r, surface(kTabBkgdCorner), surface(kTabBkgdTop), surface(kTabBkgdLeft), surface(kTabBkgd),
/*(state == kStateDisabled) ? -30 : */256, _colors[kTabBackgroundStart], _colors[kTabBackgroundEnd],
_gradientFactors[kTabFactor]);
-
+
OverlayColor tabEnd = calcGradient(_colors[kTabActiveStart], _colors[kTabActiveEnd], tabHeight, r.height()-1, _gradientFactors[kTabFactor]);
const int tabOffset = 1;
@@ -609,9 +609,9 @@ void ThemeModern::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, co
getFont()->drawString(&_screen, tabs[i], tabRect.left, tabRect.top+titleVPad, tabRect.width(), getColor(kStateEnabled), Graphics::kTextAlignCenter, 0, true);
}
-
+
// area shadow
- Common::Rect widgetBackground = Common::Rect(r.left, r.top + tabHeight - 1, r.right, r.top
+ Common::Rect widgetBackground = Common::Rect(r.left, r.top + tabHeight - 1, r.right, r.top
+ tabHeight + 20);
drawShadow(widgetBackground, surface(kTabBkgdCorner), surface(kTabBkgdTop), surface(kTabBkgdLeft), surface(kTabBkgd),
kShadowSmall);
@@ -622,7 +622,7 @@ void ThemeModern::drawTab(const Common::Rect &r, int tabHeight, int tabWidth, co
/*(state == kStateDisabled) ? -30 : */256, tabEnd, _colors[kTabActiveEnd],
_gradientFactors[kTabFactor]);
addDirtyRect(widgetBackground, true);
-
+
// active tab
if (active >= 0) {
Common::Rect tabRect(r.left + active * (tabWidth + tabOffset), r.top, r.left + active * (tabWidth + tabOffset) + tabWidth, r.top + tabHeight + 5);
@@ -653,10 +653,10 @@ void ThemeModern::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHe
// draws the 'up' button
OverlayColor buttonStart = _colors[kScrollbarButtonStart];
OverlayColor buttonEnd = _colors[kScrollbarButtonEnd];
-
+
if (scrollState == kScrollbarStateUp)
getStateColor(buttonStart, buttonEnd, buttonStart, buttonEnd, _colors[kScrollbarButtonHighlightStart], _colors[kScrollbarButtonHighlightEnd], state);
-
+
r2.bottom = r2.top + UP_DOWN_BOX_HEIGHT;
drawRectMasked(r2, surface(kScrollbarBkgdCorner), surface(kScrollbarBkgdTop), surface(kScrollbarBkgdLeft), surface(kScrollbarBkgd), 256,
buttonStart, buttonEnd, _gradientFactors[kScrollbarBkgdFactor]);
@@ -671,16 +671,16 @@ void ThemeModern::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHe
// draws the slider
OverlayColor sliderStart = _colors[kScrollbarSliderStart];
OverlayColor sliderEnd = _colors[kScrollbarSliderEnd];
-
+
if (scrollState == kScrollbarStateSlider)
getStateColor(sliderStart, sliderEnd, sliderStart, sliderEnd, _colors[kScrollbarSliderHighlightStart], _colors[kScrollbarSliderHighlightEnd], state);
-
+
r2 = r;
r2.left += 1;
r2.right -= 1;
r2.top += sliderY;
r2.bottom = r2.top + sliderHeight - 1;
-
+
drawShadow(r2, surface(kSliderCorner), surface(kSliderTop), surface(kSliderLeft), surface(kSliderBkgd), kShadowSmall);
r2.left += 1;
@@ -697,10 +697,10 @@ void ThemeModern::drawScrollbar(const Common::Rect &r, int sliderY, int sliderHe
// draws the 'down' button
buttonStart = _colors[kScrollbarButtonStart];
buttonEnd = _colors[kScrollbarButtonEnd];
-
+
if (scrollState == kScrollbarStateDown)
getStateColor(buttonStart, buttonEnd, buttonStart, buttonEnd, _colors[kScrollbarButtonHighlightStart], _colors[kScrollbarButtonHighlightEnd], state);
-
+
r2 = r;
r2.top = r2.bottom - UP_DOWN_BOX_HEIGHT;
drawRectMasked(r2, surface(kScrollbarBkgdCorner), surface(kScrollbarBkgdTop), surface(kScrollbarBkgdLeft), surface(kScrollbarBkgd), 256,
@@ -815,7 +815,7 @@ void ThemeModern::colorFade(const Common::Rect &r, OverlayColor start, OverlayCo
const int w = r.width();
const int lastRow = r.height() - 1;
const int ptrAdd = _screen.w - r.width();
- for (int l = 0; l < h; ++l) {
+ for (int l = 0; l < h; ++l) {
OverlayColor col = calcGradient(start, end, l, lastRow, factor);
for (int i = 0; i < w; ++i) {
*ptr++ = col;
@@ -1164,14 +1164,14 @@ void ThemeModern::resetupGuiRenderer() {
// ok same format no need to reload
return;
}
-
+
_lastUsedBitMask = gBitFormat;
-
+
int i;
for (i = 0; i < kImageHandlesMax; ++i) {
ImageMan.unregisterSurface(_imageHandles[i]);
}
-
+
for (i = 0; i < kImageHandlesMax; ++i) {
ImageMan.registerSurface(_imageHandles[i], 0);
_images[i] = ImageMan.getSurface(_imageHandles[i]);
@@ -1212,7 +1212,7 @@ void ThemeModern::setupColors() {
getColorFromConfig("slider_background_start", _colors[kSliderBackgroundStart]);
getColorFromConfig("slider_background_end", _colors[kSliderBackgroundEnd]);
getColorFromConfig("slider_start", _colors[kSliderStart]);
- getColorFromConfig("slider_end", _colors[kSliderEnd]);
+ getColorFromConfig("slider_end", _colors[kSliderEnd]);
getColorFromConfig("slider_highlight_start", _colors[kSliderHighStart]);
getColorFromConfig("slider_highlight_end", _colors[kSliderHighEnd]);
@@ -1313,7 +1313,7 @@ void ThemeModern::processExtraValues() {
_imageHandles[k##type##Top] = _evaluator->getStringVar("pix_"str"_top"); \
_imageHandles[k##type##Left] = _evaluator->getStringVar("pix_"str"_left"); \
_imageHandles[k##type] = _evaluator->getStringVar("pix_"str"_bkgd")
-
+
loadRectData(DialogBkgd, "dialog");
loadRectData(WidgetBkgd, "widget");
loadRectData(WidgetSmallBkgd, "widget_small");
@@ -1363,7 +1363,7 @@ void ThemeModern::processExtraValues() {
_gradientFactors[kPopUpWidgetFactor] = _evaluator->getVar("gradient_popupwidget", 1);
_gradientFactors[kEditTextFactor] = _evaluator->getVar("gradient_edittext", 1);
-
+
// load values with default values from the config file
_shadowLeftWidth = _evaluator->getVar("shadow_left_width", 2);
_shadowRightWidth = _evaluator->getVar("shadow_right_width", 4);
@@ -1374,9 +1374,9 @@ void ThemeModern::processExtraValues() {
_cursorHotspotY = _evaluator->getVar("cursor_hotspot_y", 0);
_cursorTargetScale = _evaluator->getVar("cursor_targetScale", 1);
-
+
// inactive dialog shading stuff
-
+
ShadingStyle shading = (ShadingStyle)_evaluator->getVar("inactive_dialog_shading", kShadingNone);
switch (shading) {
@@ -1396,7 +1396,7 @@ void ThemeModern::processExtraValues() {
} else if (_dimPercentValue > 100) {
_dimPercentValue = 100;
}
-
+
if (_dimPercentValue != 0) {
_dimPercentValue = 256 * (100 - _dimPercentValue) / 100;
_dialogShadingCallback = &ThemeModern::calcDimColor;
@@ -1429,14 +1429,14 @@ OverlayColor ThemeModern::calcLuminance(OverlayColor col) {
// Note that the approximation below will only produce values between
// (and including) 0 and 221.
uint lum = (r >> 2) + (g >> 1) + (b >> 3);
-
+
return _system->RGBToColor(lum, lum, lum);
}
OverlayColor ThemeModern::calcDimColor(OverlayColor col) {
uint8 r, g, b;
_system->colorToRGB(col, r, g, b);
-
+
r = r * _dimPercentValue >> 8;
g = g * _dimPercentValue >> 8;
b = b * _dimPercentValue >> 8;
@@ -1500,7 +1500,7 @@ void ThemeModern::createCursor() {
}
src += _cursorWidth;
}
-
+
_useCursor = true;
delete [] table;
}
diff --git a/gui/ThemeModern.h b/gui/ThemeModern.h
index ab1b5a7835..a3cb71510c 100644
--- a/gui/ThemeModern.h
+++ b/gui/ThemeModern.h
@@ -45,13 +45,13 @@ public:
void enable();
void disable();
-
+
void openDialog(bool topDialog);
void closeAllDialogs();
void clearAll();
void updateScreen();
-
+
void setDrawArea(const Common::Rect &r);
void resetDrawArea();
@@ -146,47 +146,47 @@ private:
kDialogBkgdTop = 1,
kDialogBkgdLeft = 2,
kDialogBkgd = 3,
-
+
kWidgetBkgdCorner = 4,
kWidgetBkgdTop = 5,
kWidgetBkgdLeft = 6,
kWidgetBkgd = 7,
-
+
kCheckboxEmpty = 8,
kCheckboxChecked = 9,
-
+
kWidgetArrow = 10,
-
+
kTabBkgdCorner = 11,
kTabBkgdTop = 12,
kTabBkgdLeft = 13,
kTabBkgd = 14,
-
+
kSliderBkgdCorner = 15,
kSliderBkgdTop = 16,
kSliderBkgdLeft = 17,
kSliderBkgd = 18,
-
+
kSliderCorner = 19,
kSliderTop = 20,
kSliderLeft = 21,
kSlider = 22,
-
+
kScrollbarBkgdCorner = 23,
kScrollbarBkgdTop = 24,
kScrollbarBkgdLeft = 25,
kScrollbarBkgd = 26,
-
+
kScrollbarCorner = 27,
kScrollbarTop = 28,
kScrollbarLeft = 29,
kScrollbar = 30,
-
+
kButtonBkgdCorner = 31,
kButtonBkgdTop = 32,
kButtonBkgdLeft = 33,
kButtonBkgd = 34,
-
+
kWidgetSmallBkgdCorner = 35,
kWidgetSmallBkgdTop = 36,
kWidgetSmallBkgdLeft = 37,
@@ -205,15 +205,15 @@ private:
kEditTextBkgd = 47,
kGUICursor = 48,
-
+
kImageHandlesMax
};
private:
int _dimPercentValue;
- typedef OverlayColor (ThemeModern::*InactiveDialogCallback)(OverlayColor col);
+ typedef OverlayColor (ThemeModern::*InactiveDialogCallback)(OverlayColor col);
InactiveDialogCallback _dialogShadingCallback;
-
+
OverlayColor calcLuminance(OverlayColor col);
OverlayColor calcDimColor(OverlayColor col);
@@ -231,56 +231,56 @@ private:
private:
Common::String _imageHandles[kImageHandlesMax];
const Graphics::Surface **_images;
-
+
enum ColorHandles {
kMainDialogStart = 0,
kMainDialogEnd = 1,
-
+
kDialogStart = 2,
kDialogEnd = 3,
-
+
kColorStateDisabled = 4,
kColorStateHighlight = 5,
kColorStateEnabled = 6,
kColorTransparency = 7,
-
+
kTextInvertedBackground = 8,
kTextInvertedColor = 9,
-
+
kWidgetBackgroundStart = 10,
kWidgetBackgroundEnd = 11,
kWidgetBackgroundSmallStart = 12,
kWidgetBackgroundSmallEnd = 13,
-
+
kButtonBackgroundStart = 14,
kButtonBackgroundEnd = 15,
kButtonTextEnabled = 16,
kButtonTextDisabled = 17,
kButtonTextHighlight = 18,
-
+
kSliderBackgroundStart = 19,
kSliderBackgroundEnd = 20,
kSliderStart = 21,
kSliderEnd = 22,
-
+
kTabBackgroundStart = 23,
kTabBackgroundEnd = 24,
-
+
kScrollbarBackgroundStart = 25,
kScrollbarBackgroundEnd = 26,
kScrollbarButtonStart = 27,
kScrollbarButtonEnd = 28,
kScrollbarSliderStart = 29,
kScrollbarSliderEnd = 30,
-
+
kCaretColor = 31,
-
+
kSliderHighStart = 32,
kSliderHighEnd = 33,
-
+
kButtonBackgroundHighlightStart = 34,
kButtonBackgroundHighlightEnd = 35,
-
+
kScrollbarButtonHighlightStart = 36,
kScrollbarButtonHighlightEnd = 37,
kScrollbarSliderHighlightStart = 38,
@@ -290,7 +290,7 @@ private:
kPopUpWidgetEnd = 41,
kPopUpWidgetHighlightStart = 42,
kPopUpWidgetHighlightEnd = 43,
-
+
kEditTextBackgroundStart = 44,
kEditTextBackgroundEnd = 45,
@@ -301,34 +301,34 @@ private:
kColorHandlesMax
};
-
+
OverlayColor _colors[kColorHandlesMax];
-
+
enum GradientFactors {
kMainDialogFactor = 0,
kDialogFactor = 1,
kDialogSpecialFactor = 2,
-
+
kWidgetSmallFactor = 3,
kWidgetFactor = 4,
-
+
kButtonFactor = 5,
-
+
kSliderFactor = 6,
kSliderBackground = 7,
-
+
kTabFactor = 7,
-
+
kScrollbarFactor = 8,
kScrollbarBkgdFactor = 9,
kPopUpWidgetFactor = 10,
-
+
kEditTextFactor = 11,
-
+
kMaxGradientFactors
};
-
+
uint _gradientFactors[kMaxGradientFactors];
};
diff --git a/gui/console.h b/gui/console.h
index c683a1f619..d347112862 100644
--- a/gui/console.h
+++ b/gui/console.h
@@ -33,7 +33,7 @@ namespace GUI {
class ScrollBarWidget;
/*
- FIXME #1: The console dialog code has some fundamental problems.
+ FIXME #1: The console dialog code has some fundamental problems.
First of, note the conflict between the (constant) value kCharsPerLine, and the
(variable) value _pageWidth. Look a bit at the code get familiar with them,
then return...
@@ -41,26 +41,26 @@ class ScrollBarWidget;
When the user changes the scaler, the console will get resized. If the dialog
becomes smaller because of this, we may have to rewrap text. If the resolution
is then increased again, we'd end up with garbled content.
-
- One can now either ignore this problem (and modify our code accordingly to
+
+ One can now either ignore this problem (and modify our code accordingly to
implement this simple rewrapping -- we currently don't do that at all!).
-
+
Or, one can go and implement a more complete console, by replacing the
_buffer by a real line buffer -- an arrach of char* pointers.
This will allow one to implement resizing perfectly, but has the drawback
of making things like scrolling, drawing etc. more complicated.
-
+
Either way, the current situation is bad, and we should resolve it one way
or the other (and if you can think of a thirds, feel free to suggest it).
-
-
-
+
+
+
FIXME #2: Another problem is that apparently _pageWidth isn't computed quite
correctly. The current line ends well before reaching the right side of the
console dialog. That's irritating and should be fixed.
-
-
- FIXME #3: The scroll bar is not shown initially, but the area it would
+
+
+ FIXME #3: The scroll bar is not shown initially, but the area it would
occupy is not used for anything else. As a result, the gap described above
becomes even wider and thus even more irritating.
*/
@@ -74,7 +74,7 @@ protected:
kBufferSize = 32768,
kCharsPerLine = 128,
kLineBufferSize = 256,
-
+
kHistorySize = 20
};
@@ -156,7 +156,7 @@ public:
_completionCallbackProc = proc;
_completionCallbackRefCon = refCon;
}
-
+
int getCharsPerLine() {
return _pageWidth;
}
diff --git a/gui/debugger.h b/gui/debugger.h
index da0253c148..ac6ae62e03 100644
--- a/gui/debugger.h
+++ b/gui/debugger.h
@@ -52,7 +52,7 @@ protected:
virtual ~Debuglet() {}
virtual bool operator()(int argc, const char **argv) = 0;
};
-
+
template <class T>
class DelegateDebuglet : public Debuglet {
typedef bool (T::*Method)(int argc, const char **argv);
@@ -68,7 +68,7 @@ protected:
return (_delegate->*_method)(argc, argv);
};
};
-
+
// Convenicence macro for registering a method of a debugger class
// as the current command.
#define WRAP_METHOD(cls, method) \
@@ -95,7 +95,7 @@ protected:
int _frame_countdown;
bool _detach_now;
-
+
private:
// TODO: Consider replacing the following two arrays by a Hashmap
int _dvar_count;
@@ -121,7 +121,7 @@ protected:
// handled, false otherwise.
virtual bool handleCommand(int argc, const char **argv, bool &keepRunning);
-
+
private:
void detach();
void enter();
diff --git a/gui/massadd.h b/gui/massadd.h
index 5723f5a6f8..29d24ca9a5 100644
--- a/gui/massadd.h
+++ b/gui/massadd.h
@@ -44,7 +44,7 @@ public:
private:
Common::Stack<FilesystemNode> _scanStack;
GameList _games;
-
+
int _dirsScanned;
Widget *_okButton;
diff --git a/gui/module.mk b/gui/module.mk
index 4e93e6b5b3..c572dcbeea 100644
--- a/gui/module.mk
+++ b/gui/module.mk
@@ -27,5 +27,5 @@ MODULE_OBJS := \
ThemeModern.o \
theme-config.o
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/gui/newgui.h b/gui/newgui.h
index 6a2920048f..bfbe77cdc0 100644
--- a/gui/newgui.h
+++ b/gui/newgui.h
@@ -128,7 +128,7 @@ protected:
void setupCursor();
void animateCursor();
-
+
Dialog *getTopDialog() const;
};
diff --git a/gui/options.h b/gui/options.h
index 8743528f12..6f0fccf3cb 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -108,7 +108,7 @@ private:
StaticTextWidget *_midiGainDesc;
SliderWidget *_midiGainSlider;
StaticTextWidget *_midiGainLabel;
-
+
//
// Subtitle controls
//
diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp
index e8adf7c327..e6d8026edb 100644
--- a/gui/theme-config.cpp
+++ b/gui/theme-config.cpp
@@ -583,9 +583,9 @@ void Theme::processSingleLine(const String &section, const String &prefix, const
// If we have all 4 parameters, set .x2 and .y2
if (npostfix == 3) {
- _evaluator->setVar(prefixedname + ".x2",
+ _evaluator->setVar(prefixedname + ".x2",
_evaluator->getVar(prefixedname + ".x") + _evaluator->getVar(prefixedname + ".w"));
- _evaluator->setVar(prefixedname + ".y2",
+ _evaluator->setVar(prefixedname + ".y2",
_evaluator->getVar(prefixedname + ".y") + _evaluator->getVar(prefixedname + ".h"));
}
@@ -733,7 +733,7 @@ bool Theme::sectionIsSkipped(Common::ConfigFile &config, const char *name, int w
default:
break;
}
-
+
ptr++;
}
diff --git a/gui/theme.cpp b/gui/theme.cpp
index 1765c3d5f5..a044769bfd 100644
--- a/gui/theme.cpp
+++ b/gui/theme.cpp
@@ -35,7 +35,7 @@ Theme::Theme() : _drawArea(), _stylefile(""), _configFile(), _loadedThemeX(0), _
_evaluator = new Eval();
}
-
+
Theme::~Theme() {
delete _evaluator;
}
@@ -79,9 +79,9 @@ const Graphics::Font *Theme::loadFont(const char *filename) {
unzReadCurrentFile(zipFile, buffer, fileInfo.uncompressed_size);
unzCloseCurrentFile(zipFile);
Common::MemoryReadStream stream(buffer, fileInfo.uncompressed_size+1);
-
+
font = Graphics::NewFont::loadFromCache(stream);
-
+
delete [] buffer;
buffer = 0;
}
@@ -109,9 +109,9 @@ const Graphics::Font *Theme::loadFont(const char *filename) {
unzReadCurrentFile(zipFile, buffer, fileInfo.uncompressed_size);
unzCloseCurrentFile(zipFile);
Common::MemoryReadStream stream(buffer, fileInfo.uncompressed_size+1);
-
+
font = Graphics::NewFont::loadFont(stream);
-
+
delete [] buffer;
buffer = 0;
}
diff --git a/gui/theme.h b/gui/theme.h
index 69ea122535..4f61609fbd 100644
--- a/gui/theme.h
+++ b/gui/theme.h
@@ -175,7 +175,7 @@ public:
*
* This for examples displays the overlay, clears the
* renderer's temporary screen buffers and does other
- * things to make the renderer for use.
+ * things to make the renderer for use.
*
* This will NOT back up the data on the overlay.
* So if you've got data in the overlay save it before
diff --git a/rules.mk b/rules.mk
index 4941da5788..9524ee4b30 100644
--- a/rules.mk
+++ b/rules.mk
@@ -35,7 +35,7 @@ OBJS += $(MODULE_LIB-$(MODULE))
$(MODULE_LIB-$(MODULE)): $(MODULE_OBJS-$(MODULE))
-$(RM) $@
$(AR) $@ $+
- $(RANLIB) $@
+ $(RANLIB) $@
# Pseudo target for comfort, allows for "make common", "make gui" etc.
$(MODULE): $(MODULE_LIB-$(MODULE))
diff --git a/sound/adpcm.h b/sound/adpcm.h
index 43296e617c..1957380eb6 100644
--- a/sound/adpcm.h
+++ b/sound/adpcm.h
@@ -35,7 +35,7 @@ namespace Audio {
class AudioStream;
// There are several types of ADPCM encoding, only some are supported here
-// For all the different encodings, refer to:
+// For all the different encodings, refer to:
// http://wiki.multimedia.cx/index.php?title=Category:ADPCM_Audio_Codecs
// Usually, if the audio stream we're trying to play has the FourCC header
// string intact, it's easy to discern which encoding is used
diff --git a/sound/flac.cpp b/sound/flac.cpp
index e9d00650d0..8dc3586142 100644
--- a/sound/flac.cpp
+++ b/sound/flac.cpp
@@ -113,7 +113,7 @@ protected:
// a 16 bit value (in fact it seems the maximal block size is 32768, but we play it safe).
BUFFER_SIZE = 65536
};
-
+
struct {
SampleType bufData[BUFFER_SIZE];
SampleType *bufReadPos;
@@ -218,14 +218,14 @@ FlacInputStream::FlacInputStream(Common::SeekableReadStream *inStream, bool disp
#else
success = (::FLAC__stream_decoder_init_stream(
_decoder,
- &FlacInputStream::callWrapRead,
- &FlacInputStream::callWrapSeek,
- &FlacInputStream::callWrapTell,
- &FlacInputStream::callWrapLength,
- &FlacInputStream::callWrapEOF,
- &FlacInputStream::callWrapWrite,
- &FlacInputStream::callWrapMetadata,
- &FlacInputStream::callWrapError,
+ &FlacInputStream::callWrapRead,
+ &FlacInputStream::callWrapSeek,
+ &FlacInputStream::callWrapTell,
+ &FlacInputStream::callWrapLength,
+ &FlacInputStream::callWrapEOF,
+ &FlacInputStream::callWrapWrite,
+ &FlacInputStream::callWrapMetadata,
+ &FlacInputStream::callWrapError,
(void*)this
) == FLAC__STREAM_DECODER_INIT_STATUS_OK);
#endif
@@ -340,7 +340,7 @@ int FlacInputStream::readBuffer(int16 *buffer, const int numSamples) {
assert(_requestedSamples % numChannels == 0);
processSingleBlock();
state = getStreamDecoderState();
-
+
if (state == FLAC__STREAM_DECODER_END_OF_STREAM) {
_lastSampleWritten = true;
}
diff --git a/sound/mididrv.h b/sound/mididrv.h
index 7775387d39..b6faf64077 100644
--- a/sound/mididrv.h
+++ b/sound/mididrv.h
@@ -88,7 +88,7 @@ enum MidiDriverType {
*
* The flags (except for MDT_PREFER_MIDI) indicate whether a given driver
* type is acceptable. E.g. the TOWNS music driver could be returned by
- * detectMusicDriver if and only if MDT_TOWNS is specified.
+ * detectMusicDriver if and only if MDT_TOWNS is specified.
*
* @todo Rename MidiDriverFlags to MusicDriverFlags
*/
@@ -178,7 +178,7 @@ public:
* opcode.
*/
virtual void send(uint32 b) = 0;
-
+
/**
* Output a midi command to the midi stream. Convenience wrapper
* around the usual 'packed' send method.
@@ -209,11 +209,11 @@ public:
/**
* Transmit a sysEx to the midi device.
*
- * The given msg MUST NOT contain the usual SysEx frame, i.e.
+ * The given msg MUST NOT contain the usual SysEx frame, i.e.
* do NOT include the leading 0xF0 and the trailing 0xF7.
*
* Furthermore, the maximal supported length of a SysEx
- * is 254 bytes. Passing longer buffers can lead to
+ * is 254 bytes. Passing longer buffers can lead to
* undefined behavior (most likely, a crash).
*/
virtual void sysEx(const byte *msg, uint16 length) { }
diff --git a/sound/mods/infogrames.cpp b/sound/mods/infogrames.cpp
index 3f607d213e..97987b037a 100644
--- a/sound/mods/infogrames.cpp
+++ b/sound/mods/infogrames.cpp
@@ -106,7 +106,7 @@ const uint16 Infogrames::periods[] =
{0x6ACC, 0x64CC, 0x5F25, 0x59CE, 0x54C3, 0x5003, 0x4B86, 0x4747, 0x4346,
0x3F8B, 0x3BF3, 0x3892, 0x3568, 0x3269, 0x2F93, 0x2CEA, 0x2A66, 0x2801,
0x2566, 0x23A5, 0x21AF, 0x1FC4, 0x1DFE, 0x1C4E, 0x1ABC, 0x1936, 0x17CC,
- 0x1676, 0x1533, 0x1401, 0x12E4, 0x11D5, 0x10D4, 0x0FE3, 0x0EFE, 0x0E26,
+ 0x1676, 0x1533, 0x1401, 0x12E4, 0x11D5, 0x10D4, 0x0FE3, 0x0EFE, 0x0E26,
0x0D5B, 0x0C9B, 0x0BE5, 0x0B3B, 0x0A9B, 0x0A02, 0x0972, 0x08E9, 0x0869,
0x07F1, 0x077F, 0x0713, 0x06AD, 0x064D, 0x05F2, 0x059D, 0x054D, 0x0500,
0x04B8, 0x0475, 0x0435, 0x03F8, 0x03BF, 0x038A, 0x0356, 0x0326, 0x02F9,
@@ -405,7 +405,7 @@ int16 Infogrames::tune(Slide &slide, int16 start) const {
}
}
slide.dataOffset = off;
- }
+ }
slide.flags |= 1;
return start;
}
diff --git a/sound/mods/paula.cpp b/sound/mods/paula.cpp
index cfd9ebff11..545390ff93 100644
--- a/sound/mods/paula.cpp
+++ b/sound/mods/paula.cpp
@@ -92,21 +92,21 @@ template<bool stereo>
int Paula::readBufferIntern(int16 *buffer, const int numSamples) {
int samples = _stereo ? numSamples / 2 : numSamples;
while (samples > 0) {
-
+
// Handle 'interrupts'. This gives subclasses the chance to adjust the channel data
// (e.g. insert new samples, do pitch bending, whatever).
if (_curInt == _intFreq) {
interrupt();
_curInt = 0;
}
-
+
// Compute how many samples to generate: at most the requested number of samples,
// of course, but we may stop earlier when an 'interrupt' is expected.
const int nSamples = MIN(samples, _intFreq - _curInt);
-
+
// Loop over the four channels of the emulated Paula chip
for (int voice = 0; voice < NUM_VOICES; voice++) {
-
+
// No data, or paused -> skip channel
if (!_voice[voice].data || (_voice[voice].period <= 0))
continue;
@@ -148,7 +148,7 @@ int Paula::readBufferIntern(int16 *buffer, const int numSamples) {
sLen = intToFrac(_voice[voice].length);
// If the "rate" exceeds the sample rate, we would have to perform constant
- // wrap arounds. So, apply the first step of the euclidean algorithm to
+ // wrap arounds. So, apply the first step of the euclidean algorithm to
// achieve the same more efficiently: Take rate modulo sLen
if (sLen < rate)
rate %= sLen;
diff --git a/sound/mods/paula.h b/sound/mods/paula.h
index e86c05b7f8..e3c6002451 100644
--- a/sound/mods/paula.h
+++ b/sound/mods/paula.h
@@ -79,12 +79,12 @@ protected:
_playing = true;
_end = false;
}
-
+
void stopPaula() {
_playing = false;
_end = true;
}
-
+
void setChannelPanning(byte channel, byte panning) {
assert(channel < NUM_VOICES);
_voice[channel].panning = panning;
diff --git a/sound/mp3.cpp b/sound/mp3.cpp
index 16ea2d2834..72ed361926 100644
--- a/sound/mp3.cpp
+++ b/sound/mp3.cpp
@@ -54,15 +54,15 @@ protected:
Common::SeekableReadStream *_inStream;
bool _disposeAfterUse;
-
+
uint _numLoops;
uint _posInFrame;
State _state;
-
+
const mad_timer_t _startTime;
const mad_timer_t _endTime;
mad_timer_t _totalTime;
-
+
mad_stream _stream;
mad_frame _frame;
mad_synth _synth;
@@ -70,7 +70,7 @@ protected:
enum {
BUFFER_SIZE = 5 * 8192
};
-
+
// This buffer contains a slab of input data
byte _buf[BUFFER_SIZE + MAD_BUFFER_GUARD];
@@ -81,7 +81,7 @@ public:
mad_timer_t end = mad_timer_zero,
uint numLoops = 1);
~MP3InputStream();
-
+
int readBuffer(int16 *buffer, const int numSamples);
bool endOfData() const { return _state == MP3_STATE_EOS; }
@@ -136,19 +136,19 @@ void MP3InputStream::decodeMP3Data() {
mad_stream_init(&_stream);
mad_frame_init(&_frame);
mad_synth_init(&_synth);
-
+
// Reset the stream data
_inStream->seek(0, SEEK_SET);
_totalTime = mad_timer_zero;
_posInFrame = 0;
-
+
// Update state
_state = MP3_STATE_READY;
-
+
// Read the first few sample bytes
readMP3Data();
}
-
+
if (_state == MP3_STATE_EOS)
return;
@@ -173,10 +173,10 @@ void MP3InputStream::decodeMP3Data() {
break;
}
}
-
+
// Sum up the total playback time so far
mad_timer_add(&_totalTime, _frame.header.duration);
-
+
// If we have not yet reached the start point, skip to the next frame
if (mad_timer_compare(_totalTime, _startTime) < 0)
continue;
@@ -186,7 +186,7 @@ void MP3InputStream::decodeMP3Data() {
_state = MP3_STATE_EOS;
break;
}
-
+
// Decode the next frame
if (mad_frame_decode(&_frame, &_stream) == -1) {
if (_stream.error == MAD_ERROR_BUFLEN) {
@@ -202,13 +202,13 @@ void MP3InputStream::decodeMP3Data() {
break;
}
}
-
+
// Synthesize PCM data
mad_synth_frame(&_synth, &_frame);
_posInFrame = 0;
break;
}
-
+
if (_state == MP3_STATE_EOS && _numLoops != 1) {
// If looping is on and there are loops left, rewind to the start
if (_numLoops != 0)
@@ -218,13 +218,13 @@ void MP3InputStream::decodeMP3Data() {
mad_synth_finish(&_synth);
mad_frame_finish(&_frame);
mad_stream_finish(&_stream);
-
+
// Reset the decoder state to indicate we should start over
_state = MP3_STATE_INIT;
}
} while (_state != MP3_STATE_EOS && _stream.error == MAD_ERROR_BUFLEN);
-
+
if (_stream.error != MAD_ERROR_NONE)
_state = MP3_STATE_EOS;
}
@@ -253,7 +253,7 @@ void MP3InputStream::readMP3Data() {
_state = MP3_STATE_EOS;
return;
}
-
+
// Feed the data we just read into the stream decoder
_stream.error = MAD_ERROR_NONE;
mad_stream_buffer(&_stream, _buf, size + remaining);
diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp
index 6b0dbca5bb..90f411b1df 100644
--- a/sound/softsynth/adlib.cpp
+++ b/sound/softsynth/adlib.cpp
@@ -675,8 +675,8 @@ void AdlibPart::pitchBend(int16 bend) {
void AdlibPart::controlChange(byte control, byte value) {
switch (control) {
- case 0:
- case 32:
+ case 0:
+ case 32:
break; // Bank select. Not supported
case 1: modulationWheel(value); break;
case 7: volume(value); break;
diff --git a/sound/softsynth/mt32/module.mk b/sound/softsynth/mt32/module.mk
index ac208a563f..4d5d899ac3 100644
--- a/sound/softsynth/mt32/module.mk
+++ b/sound/softsynth/mt32/module.mk
@@ -10,5 +10,5 @@ MODULE_OBJS := \
tables.o \
freeverb.o
-# Include common rules
+# Include common rules
include $(srcdir)/rules.mk
diff --git a/sound/softsynth/mt32/structures.h b/sound/softsynth/mt32/structures.h
index 7c6e5f131d..ef58c1d20f 100644
--- a/sound/softsynth/mt32/structures.h
+++ b/sound/softsynth/mt32/structures.h
@@ -143,7 +143,7 @@ struct MemParams {
Bit8u panpot; // PANPOT 0-14 (R-L)
Bit8u dummyv[6];
} MT32EMU_ALIGN_PACKED;
-
+
PatchTemp patchSettings[9];
struct RhythmTemp {
@@ -152,7 +152,7 @@ struct MemParams {
Bit8u panpot; // PANPOT 0-14 (R-L)
Bit8u reverbSwitch; // REVERB SWITCH 0-1 (OFF,ON)
} MT32EMU_ALIGN_PACKED;
-
+
RhythmTemp rhythmSettings[85];
TimbreParam timbreSettings[8];
@@ -164,7 +164,7 @@ struct MemParams {
TimbreParam timbre;
Bit8u padding[10];
} MT32EMU_ALIGN_PACKED;
-
+
PaddedTimbre timbres[64 + 64 + 64 + 64]; // Group A, Group B, Memory, Rhythm
struct SystemArea {
@@ -176,7 +176,7 @@ struct MemParams {
Bit8u chanAssign[9]; // MIDI CHANNEL (PART1) 0-16 (1-16,OFF)
Bit8u masterVol; // MASTER VOLUME 0-100
} MT32EMU_ALIGN_PACKED;
-
+
SystemArea system;
};
diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp
index e3aa9d2528..57ad0f1c62 100644
--- a/sound/softsynth/ym2612.cpp
+++ b/sound/softsynth/ym2612.cpp
@@ -96,8 +96,8 @@ void Operator2612::setInstrument(byte const *instrument) {
void Operator2612::keyOn() {
_state = _s_attacking;
_tickCount = 0;
- _phase = 0;
- _currentLevel = ((int32)0x7f << 15);
+ _phase = 0;
+ _currentLevel = ((int32)0x7f << 15);
}
void Operator2612::keyOff() {
@@ -124,7 +124,7 @@ void Operator2612::frequency(int freq) {
else {
value = powtbl[(r&3) << 7];
value *= 1 << (r >> 2);
- value *= 41;
+ value *= 41;
value /= 1 << (15 + 5);
value *= 127 - _specifiedTotalLevel;
value /= 127;
@@ -228,11 +228,11 @@ void Operator2612::nextTick(const int *phasebuf, int *outbuf, int buflen) {
}
if (level < zero_level) {
- int phaseShift = *phasebuf >> 2;
+ int phaseShift = *phasebuf >> 2;
if (_feedbackLevel)
phaseShift += (output << (_feedbackLevel - 1)) / 1024;
output = sintbl[((_phase >> 7) + phaseShift) & 0x7ff];
- output >>= (level >> 18);
+ output >>= (level >> 18);
// Here is the original code, which requires 64-bit ints
// output *= powtbl[511 - ((level>>25)&511)];
// output >>= 16;
@@ -437,9 +437,9 @@ void Voice2612::pitchBend(int value) {
}
void Voice2612::recalculateFrequency() {
- //
- //
- //
+ //
+ //
+ //
int32 basefreq = frequencyTable[_note];
int cfreq = frequencyTable[_note - (_note % 12)];
int oct = _note / 12;
@@ -696,7 +696,7 @@ void MidiDriver_YM2612::createLookupTables() {
};
// (int)(880.0 * 256.0 * pow(2.0, (note-0x51)/12.0))
- //
+ //
frequencyTable = new int [120];
for (block = -1; block < 9; block++) {
for (i = 0; i < 12; i++) {
@@ -706,7 +706,7 @@ void MidiDriver_YM2612::createLookupTables() {
}
keycodeTable = new int [120];
- // detune
+ // detune
for (block = -1; block < 9; block++) {
for (i = 0; i < 12; i++) {
// see p.204
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 668cdf4fc7..a4b0f854e9 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -53,7 +53,7 @@ static size_t read_stream_wrap(void *ptr, size_t size, size_t nmemb, void *datas
Common::SeekableReadStream *stream = (Common::SeekableReadStream *)datasource;
uint32 result = stream->read(ptr, size * nmemb);
-
+
return result / size;
}
@@ -92,7 +92,7 @@ protected:
bool _isStereo;
int _rate;
uint _numLoops;
-
+
#ifdef USE_TREMOR
ogg_int64_t _startTime;
ogg_int64_t _endTime;
@@ -106,7 +106,7 @@ protected:
int16 _buffer[4096];
const int16 *_bufferEnd;
const int16 *_pos;
-
+
public:
// startTime / duration are in milliseconds
VorbisInputStream(Common::SeekableReadStream *inStream, bool dispose, uint startTime = 0, uint endTime = 0, uint numLoops = 1);
@@ -148,7 +148,7 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool
_startTime = startTime / 1000.0;
_endTime = endTime / 1000.0;
#endif
-
+
// If endTime was 0, or is past the end of the file, set it to the maximal time possible
totalTime = ov_time_total(&_ovFile, -1);
if (_endTime == 0 || _endTime > totalTime)
@@ -159,13 +159,13 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool
_pos = _bufferEnd;
return;
}
-
+
// Seek to the start position
ov_time_seek(&_ovFile, _startTime);
// Read in initial data
refill();
-
+
// Setup some header information
_isStereo = ov_info(&_ovFile, -1)->channels >= 2;
_rate = ov_info(&_ovFile, -1)->rate;
@@ -221,7 +221,7 @@ void VorbisInputStream::refill() {
long result;
#ifdef USE_TREMOR
// Tremor ov_read() always returns data as signed 16 bit interleaved PCM
- // in host byte order. As such, it does not take arguments to request
+ // in host byte order. As such, it does not take arguments to request
// specific signedness, byte order or bit depth as in Vorbisfile.
result = ov_read(&_ovFile, read_pos, len_left,
NULL);
diff --git a/test/common/hashmap.h b/test/common/hashmap.h
index cb69c4417b..af78baba96 100644
--- a/test/common/hashmap.h
+++ b/test/common/hashmap.h
@@ -61,7 +61,7 @@ class HashMapTestSuite : public CxxTest::TestSuite
// The container is initially empty ...
TS_ASSERT( container.begin() == container.end() );
-
+
// ... then non-empty ...
container[324] = 33;
TS_ASSERT( container.begin() != container.end() );
diff --git a/test/common/list.h b/test/common/list.h
index 6502622be8..c206dbe009 100644
--- a/test/common/list.h
+++ b/test/common/list.h
@@ -22,7 +22,7 @@ class ListTestSuite : public CxxTest::TestSuite
// The container is initially empty ...
TS_ASSERT( container.begin() == container.end() );
-
+
// ... then non-empty ...
container.push_back(33);
TS_ASSERT( container.begin() != container.end() );
diff --git a/test/common/pack.h b/test/common/pack.h
index e618a39743..1db8c8c409 100644
--- a/test/common/pack.h
+++ b/test/common/pack.h
@@ -15,7 +15,7 @@ struct TestStruct {
#include <common/pack-end.h> // END STRUCT PACKING
-#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42)
+#define OFFS(type,item) (((ptrdiff_t)(&((type*)42)->type::item))-42)
class PackTestSuite : public CxxTest::TestSuite
{
diff --git a/test/module.mk b/test/module.mk
index 2a813c7869..22c2dfa2c5 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -11,7 +11,7 @@ TEST_LIBS := common/libcommon.a
#
TEST_FLAGS := --runner=StdioPrinter
TEST_CFLAGS := -Itest/cxxtest
-TEST_LDFLAGS :=
+TEST_LDFLAGS :=
# Enable this to get an X11 GUI for the error reporter.
diff --git a/tools/README b/tools/README
index d1c9e08e8d..8e5a267daf 100644
--- a/tools/README
+++ b/tools/README
@@ -6,12 +6,12 @@ at all, documented. Use at your own risk. You've been warned :-)
convbdf
-------
Tool which converts BDF fonts (BDF = Bitmap Distribution Format) to C++
- source. That source, after being slightly tweaked, can be used to
+ source. That source, after being slightly tweaked, can be used to
replace or add fonts for the ScummVM GUI.
-
+
There is also a ttf2bdf tool which allows you to convert TrueType fonts
to BDF.
-
+
Hint from SumthinWicked: If you use ttf2bdf, it'll convert all glyphs to
bitmaps, but ScummVM only needs some of them. So you may want to do your
conversion like this:
@@ -32,15 +32,15 @@ dist-scummvm.sh
releases. After tagging a branch for release, you can invoke it like this:
./dist-scummvm.sh scummvm 0.7.1
-
+
Note #1: This creates .zip, .tar.bz2 and .tar.gz archives in /tmp by default.
To do that it performs a "cvs export" in /tmp first. If you want to use
another location, you can specify it as the thirds param to the script.
-
- Note #2: This assumes that our naming conventions for release tags are
+
+ Note #2: This assumes that our naming conventions for release tags are
being followed. I.e. the tag must be named "release-0-7-1" in the above
example. You can, however, specify an alternate tag as the fourth param.
-
+
Note #3: Since SF.net anon CVS tends to lag behind developer CVS, if you
just tagged CVS, anon CVS may not yet have this. So if you are in a hurry,
modify the cvsroot in the script to use your dev CVS account.
diff --git a/tools/agi-palex.py b/tools/agi-palex.py
index 58306dddbe..1e0fa9d54f 100644
--- a/tools/agi-palex.py
+++ b/tools/agi-palex.py
@@ -67,7 +67,7 @@ def printPalette(palette, filename, arrayname):
comments = ["A 16-color, 12-bit RGB palette from an Amiga AGI game."]
comments.append("Extracted from file " + os.path.basename(filename))
printCommentLineList(comments)
-
+
# Print the palette as a C-style array
print "static const unsigned char " + arrayname + "[] = {"
for color in palette[:-1]:
@@ -80,20 +80,20 @@ def isAmigaPalette(palette):
# Palette must be of correct size
if len(palette) != colorsPerPalette:
return False
-
+
# First palette color must be black and last palette color must be black
if palette[whiteColorNum] != decodedWhite or palette[blackColorNum] != decodedBlack:
return False
-
+
# All colors must be 12-bit (i.e. 4 bits per color component)
for color in palette:
if not isColor12Bit(color):
return False
-
+
# All colors must be unique
if len(set(palette)) != colorsPerPalette:
return False
-
+
return True
def preliminaryPaletteTest(data, pos):
@@ -128,7 +128,7 @@ def searchForAmigaPalettes(filename):
# Save good candidates to a list
if isAmigaPalette(palette):
foundPalettes.append(tuple(palette))
- # Close source file and return unique found palettes
+ # Close source file and return unique found palettes
file.close()
return set(foundPalettes)
except IOError:
diff --git a/tools/convbdf.c b/tools/convbdf.c
index 55de73a648..526f34bdf5 100644
--- a/tools/convbdf.c
+++ b/tools/convbdf.c
@@ -83,7 +83,7 @@ struct font {
BBX* bbx; /* character bounding box or NULL if fixed*/
int defaultchar; /* default char (not glyph index)*/
long bits_size; /* # words of bitmap_t bits*/
-
+
/* unused by runtime system, read in by convbdf*/
char * facename; /* facename of font*/
char * copyright; /* copyright info for loadable fonts*/
@@ -161,11 +161,11 @@ void getopts(int *pac, char ***pav)
const char *p;
char **av;
int ac;
-
+
ac = *pac;
av = *pav;
while (ac > 0 && av[0][0] == '-') {
- p = &av[0][1];
+ p = &av[0][1];
while (*p) {
switch (*p++) {
case ' ': /* multiple -args on av[]*/
@@ -254,7 +254,7 @@ int convbdf(char *path)
pf = bdf_read_font(path);
if (!pf)
exit(1);
-
+
if (!oflag) {
strcpy(outfile, basename(path));
strcat(outfile, ".cpp");
@@ -280,12 +280,12 @@ int main(int ac, char *av[])
usage();
exit(1);
}
-
+
while (ac > 0) {
ret |= convbdf(av[0]);
++av; --ac;
}
-
+
exit(ret);
}
@@ -313,11 +313,11 @@ struct font* bdf_read_font(char *path)
fprintf(stderr, "Error opening file: %s\n", path);
return NULL;
}
-
+
pf = (struct font*)calloc(1, sizeof(struct font));
if (!pf)
goto errout;
-
+
pf->name = strdup(basename(path));
if (!bdf_read_header(fp, pf)) {
@@ -422,8 +422,8 @@ int bdf_read_header(FILE *fp, struct font* pf)
fprintf(stderr, "Error: bad 'ENCODING'\n");
return 0;
}
- if (encoding >= 0 &&
- encoding <= limit_char &&
+ if (encoding >= 0 &&
+ encoding <= limit_char &&
encoding >= start_char) {
if (firstchar > encoding)
@@ -445,15 +445,15 @@ int bdf_read_header(FILE *fp, struct font* pf)
pf->height = pf->ascent + pf->descent;
/* calc default char*/
- if (pf->defaultchar < 0 ||
- pf->defaultchar < firstchar ||
+ if (pf->defaultchar < 0 ||
+ pf->defaultchar < firstchar ||
pf->defaultchar > limit_char )
pf->defaultchar = firstchar;
/* calc font size (offset/width entries)*/
pf->firstchar = firstchar;
pf->size = lastchar - firstchar + 1;
-
+
/* use the font boundingbox to get initial maxwidth*/
/*maxwidth = pf->fbbw - pf->fbbx;*/
maxwidth = pf->fbbw;
@@ -466,7 +466,7 @@ int bdf_read_header(FILE *fp, struct font* pf)
pf->offset = (unsigned long *)malloc(pf->size * sizeof(unsigned long));
pf->width = (unsigned char *)malloc(pf->size * sizeof(unsigned char));
pf->bbx = (BBX *)malloc(pf->size * sizeof(BBX));
-
+
if (!pf->bits || !pf->offset || !pf->width) {
fprintf(stderr, "Error: no memory for font load\n");
return 0;
@@ -570,7 +570,7 @@ int bdf_read_bitmaps(FILE *fp, struct font* pf)
for (k = 0; k < ch_words; ++k) {
bitmap_t value;
-
+
value = bdf_hexval((unsigned char *)buf);
if (bbw > 8) {
@@ -714,7 +714,7 @@ bitmap_t bdf_hexval(unsigned char *buf) {
c = c - 'A' + 10;
else if (c >= 'a' && c <= 'f')
c = c - 'a' + 10;
- else
+ else
c = 0;
val = (val << 4) | c;
}
@@ -767,7 +767,7 @@ int gen_c_source(struct font* pf, char *path)
strcpy(buf, ctime(&t));
buf[strlen(buf) - 1] = 0;
- fprintf(ofp, hdr1, buf,
+ fprintf(ofp, hdr1, buf,
pf->name,
pf->facename? pf->facename: "",
pf->maxwidth, pf->height,
@@ -796,7 +796,7 @@ int gen_c_source(struct font* pf, char *path)
* the default character in encode map, or the default
* character hasn't been generated yet.
*/
- if (pf->offset &&
+ if (pf->offset &&
(pf->offset[i] == pf->offset[pf->defaultchar-pf->firstchar])) {
if (did_defaultchar)
continue;
@@ -849,7 +849,7 @@ int gen_c_source(struct font* pf, char *path)
fprintf(stderr, "Warning: found encoding values in non-sorted order (not an error).\n");
did_syncmsg = 1;
}
- }
+ }
}
fprintf(ofp, "};\n\n");
@@ -859,7 +859,7 @@ int gen_c_source(struct font* pf, char *path)
"static const unsigned long _sysfont_offset[] = {\n");
for (i = 0; i < pf->size; ++i)
- fprintf(ofp, " %ld,\t/* (0x%02x) */\n",
+ fprintf(ofp, " %ld,\t/* (0x%02x) */\n",
pf->offset[i], i+pf->firstchar);
fprintf(ofp, "};\n\n");
}
@@ -870,7 +870,7 @@ int gen_c_source(struct font* pf, char *path)
"static const unsigned char _sysfont_width[] = {\n");
for (i = 0; i < pf->size; ++i)
- fprintf(ofp, " %d,\t/* (0x%02x) */\n",
+ fprintf(ofp, " %d,\t/* (0x%02x) */\n",
pf->width[i], i+pf->firstchar);
fprintf(ofp, "};\n\n");
}
@@ -936,6 +936,6 @@ int gen_c_source(struct font* pf, char *path)
fprintf(ofp, "DEFINE_FONT(g_sysfont)\n");
fprintf(ofp, "#endif\n");
fprintf(ofp, "\n} // End of namespace Graphics\n");
-
+
return 0;
}
diff --git a/tools/create_kyradat/Makefile b/tools/create_kyradat/Makefile
index 7319ad0658..b4deafe6d4 100644
--- a/tools/create_kyradat/Makefile
+++ b/tools/create_kyradat/Makefile
@@ -1,10 +1,10 @@
CXX ?= g++
CC ?= gcc
-LDFLAGS ?=
+LDFLAGS ?=
CXXFLAGS ?= -O2
CFLAGS ?= -O2
-CPPFLAGS ?=
+CPPFLAGS ?=
BIN=create_kyradat
diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp
index af002b5935..1fcd9ae882 100644
--- a/tools/create_kyradat/create_kyradat.cpp
+++ b/tools/create_kyradat/create_kyradat.cpp
@@ -123,7 +123,7 @@ const ExtractFilename extractFilenames[] = {
// GUI strings table
{ kGUIStrings, kTypeLanguageList, "GUISTRINGS" },
{ kConfigStrings, kTypeLanguageList, "CONFIGSTRINGS" },
-
+
// ROOM table/filenames
{ kRoomList, kTypeRoomList, "ROOM-TABLE.ROOM" },
{ kRoomFilenames, kTypeStringList, "ROOM-FILENAMES.TXT" },
@@ -186,7 +186,7 @@ const ExtractFilename extractFilenames[] = {
{ kPaletteList31, kTypeRawData, "PALTABLE31.PAL" },
{ kPaletteList32, kTypeRawData, "PALTABLE32.PAL" },
{ kPaletteList33, kTypeRawData, "PALTABLE33.PAL" },
-
+
// FM-TOWNS specific
{ kKyra1TownsSFXwdTable, kTypeRawData, "SFXWDTABLE" },
{ kKyra1TownsSFXbtTable, kTypeRawData, "SFXBTTABLE" },
@@ -205,14 +205,14 @@ const ExtractFilename extractFilenames[] = {
{ k2SeqplayTlkFiles, kTypeLanguageList, "S_TLKFILES" },
{ k2SeqplaySeqData, k2TypeSeqData, "S_DATA.SEQ" },
{ k2SeqplayIntroTracks, kTypeStringList, "S_INTRO.TRA" },
- { k2SeqplayFinaleTracks, kTypeStringList, "S_FINALE.TRA" },
+ { k2SeqplayFinaleTracks, kTypeStringList, "S_FINALE.TRA" },
{ k2SeqplayIntroCDA, kTypeRawData, "S_INTRO.CDA" },
{ k2SeqplayFinaleCDA, kTypeRawData, "S_FINALE.CDA" },
// Ingame
{ k2IngamePakFiles, kTypeStringList, "I_PAKFILES.TXT" },
{ k2IngameSfxFiles, kTypeStringList, "I_SFXFILES.TXT" },
- { k2IngameSfxIndex, kTypeRawData, "I_SFXINDEX.TRA" },
+ { k2IngameSfxIndex, kTypeRawData, "I_SFXINDEX.TRA" },
{ k2IngameTracks, kTypeStringList, "I_TRACKS.TRA" },
{ k2IngameCDA, kTypeRawData, "I_TRACKS.CDA" },
@@ -253,9 +253,9 @@ bool getFilename(char *dstFilename, const Game *g, const int id) {
void createFilename(char *dstFilename, const int gid, const int lang, const int special, const char *filename) {
strcpy(dstFilename, filename);
- static const char *gidExtensions[] = { "", ".K2", ".K3" };
+ static const char *gidExtensions[] = { "", ".K2", ".K3" };
strcat(dstFilename, gidExtensions[gid]);
-
+
for (const SpecialExtension *specialE = specialTable; specialE->special != -1; ++specialE) {
if (specialE->special == special) {
strcat(dstFilename, ".");
@@ -276,9 +276,9 @@ void createLangFilename(char *dstFilename, const int gid, const int lang, const
}
}
- static const char *gidExtensions[] = { "", ".K2", ".K3" };
+ static const char *gidExtensions[] = { "", ".K2", ".K3" };
strcat(dstFilename, gidExtensions[gid]);
-
+
for (const SpecialExtension *specialE = specialTable; specialE->special != -1; ++specialE) {
if (specialE->special == special) {
strcat(dstFilename, ".");
@@ -314,13 +314,13 @@ int hashEntries(const Game *game, const GameNeed *need, const PAKFile *file) {
hash += *i;
continue;
}
-
+
if (file) {
filename[0] = 0;
if (!getFilename(filename, game, *i))
error("couldn't find filename for id %d", *i);
-
+
PAKFile::cFileList *list = file->getFileList();
if (list && list->findEntry(filename) != 0)
hash += *i;
@@ -328,7 +328,7 @@ int hashEntries(const Game *game, const GameNeed *need, const PAKFile *file) {
}
return hash;
-}
+}
bool hasNeededEntries(const Game *game, const PAKFile *file) {
for (const GameNeed *need = gameNeedTable; need->game != -1; ++need) {
@@ -383,7 +383,7 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32
targetsize--;
}
if (fmtPatch == 1) {
- // Here is the first step of the extra treatment for all fm-towns string arrays that
+ // Here is the first step of the extra treatment for all fm-towns string arrays that
// contain more than one string and which the original code
// addresses via stringname[boolJapanese].
// We simply skip every other string
@@ -406,7 +406,7 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32
}
}
}
-
+
if (fmtPatch == 2) {
if (g->special == kFMTownsVersionE)
targetsize--;
@@ -423,7 +423,7 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32
if (fmtPatch == 4) {
targetsize -= 9;
}
-
+
uint8 *buffer = new uint8[targetsize];
assert(buffer);
uint8 *output = buffer;
@@ -465,7 +465,7 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32
}
if (fmtPatch == 1) {
- // Here is the extra treatment for all fm-towns string arrays that
+ // Here is the extra treatment for all fm-towns string arrays that
// contain more than one string and which the original code
// addresses via stringname[boolJapanese].
// We simply skip every other string
@@ -610,7 +610,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint
memcpy(output , ptr, 30);
ptr += 30;
output += 30;
-
+
if (g->special == k2TownsFile1E) {
memcpy(output , ptr, 2);
ptr += 2;
@@ -620,7 +620,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint
ptr += 2;
*output++ = READ_LE_UINT16(ptr) & 0xff;
ptr += 2;
- }
+ }
memcpy(output, ptr, 14);
ptr += 18;
@@ -651,7 +651,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint
memcpy(output, ctrStart, ctrSize);
output += ctrSize;
}
- }
+ }
numNestedSequences++;
uint16 relOffs = (uint16) (output - buffer);
@@ -674,7 +674,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint
controlOffs = 0;
//else if (controlOffs)
// debug(1, "assigning frame control with output file offset 0x%x to item %s (output file offset: 0x%x)", controlOffs, cc, relOffs);
-
+
WRITE_LE_UINT16(output, controlOffs);
if (g->special != k2DemoVersion)
ptr += 4;
@@ -726,7 +726,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint
assert(finBuffer);
uint16 diff = headerSize - finHeaderSize;
uint16 *finHeader = (uint16*) finBuffer;
-
+
for (int i = 1; i < finHeaderSize; i++)
WRITE_LE_UINT16(&finHeader[i], (READ_LE_UINT16(&header[i]) - diff));
WRITE_LE_UINT16(finHeader, numSequences);
@@ -760,7 +760,7 @@ int extractHofSeqData_checkString(const void *ptr, uint8 checkSize) {
while (c--) {
if (*s > 31 && *s < 123)
t++;
- s++;
+ s++;
}
if (t == checkSize)
@@ -781,7 +781,7 @@ int extractHofSeqData_isSequence(const void *ptr, const Game *g, uint32 maxCheck
if (maxCheckSize < 30)
return -2;
-
+
const uint8 * s = (const uint8*)ptr;
int c1 = extractHofSeqData_checkString(s + 2, 6);
int c2 = extractHofSeqData_checkString(s + 16, 6);
@@ -806,11 +806,11 @@ int extractHofSeqData_isSequence(const void *ptr, const Game *g, uint32 maxCheck
if (c0 == 0 && c5 == 4 && c3 == 0 && c4 == 0) {
if (maxCheckSize >= 41 && READ_LE_UINT32(s + 34) && !(s[39] | s[41]) && s[40] > s[38])
return 1;
- }
+ }
if (c0 == 0 && c5 && c1 == 1 && c4 == -1 && s[20])
return 0;
-
+
return -1;
}
@@ -876,7 +876,7 @@ uint32 getFeatures(const Game *g) {
features |= GF_ITALIAN;
else if (g->lang == JA_JPN)
features |= GF_JAPANESE;
-
+
return features;
}
@@ -895,7 +895,7 @@ bool updateIndex(byte *dst, const int dstSize, const Game *g) {
bool checkIndex(const byte *s, const int srcSize) {
if ((size_t)srcSize < sizeof(uint32))
- return false;
+ return false;
uint32 version = READ_BE_UINT32(s);
return (version == kKyraDatVersion);
}
@@ -903,28 +903,28 @@ bool checkIndex(const byte *s, const int srcSize) {
bool updateIndex(PAKFile &out, const Game *g) {
char filename[32];
createFilename(filename, g->game, -1, g->special, "INDEX");
-
+
byte *index = new byte[kIndexSize];
assert(index);
memset(index, 0, kIndexSize);
-
+
uint32 size = 0;
const uint8 *data = out.getFileData(filename, &size);
if (data)
memcpy(index, data, size);
-
+
if (!updateIndex(index, kIndexSize, g)) {
delete [] index;
return false;
}
-
+
out.removeFile(filename);
if (!out.addFile(filename, index, kIndexSize)) {
fprintf(stderr, "ERROR: couldn't update %s file", filename);
delete [] index;
return false;
}
-
+
return true;
}
@@ -955,7 +955,7 @@ int main(int argc, char *argv[]) {
printHelp(argv[0]);
return -1;
}
-
+
PAKFile out;
out.loadFile(argv[1], false);
@@ -969,10 +969,10 @@ int main(int argc, char *argv[]) {
uint32 size = fileSize(input);
fseek(input, 0, SEEK_SET);
-
+
byte *buffer = new uint8[size];
assert(buffer);
-
+
if (fread(buffer, 1, size, input) != size) {
warning("couldn't read from file '%s', skipping it", argv[i]);
delete [] buffer;
@@ -980,23 +980,23 @@ int main(int argc, char *argv[]) {
continue;
}
fclose(input);
-
+
const Game *g = findGame(buffer, size);
if (!g) {
warning("skipping unknown file '%s'", argv[i]);
delete [] buffer;
continue;
}
-
+
if (!hasNeededEntries(g, &out)) {
warning("file '%s' is missing offset entries and thus can't be processed", argv[i]);
delete [] buffer;
continue;
}
-
+
if (!process(out, g, buffer, size))
fprintf(stderr, "ERROR: couldn't process file '%s'", argv[i]);
-
+
if (g->special == kFMTownsVersionE || g->special == k2TownsFile1E || g->special == k2TownsFile2E ||
g->special == k2CDFile1E || g->special == k2CDFile2E) {
// This is for executables which contain support for at least 2 languages
@@ -1022,7 +1022,7 @@ int main(int argc, char *argv[]) {
if (!process(out, g, buffer, size))
fprintf(stderr, "ERROR: couldn't process file '%s'", argv[i]);
}
-
+
delete [] buffer;
}
@@ -1038,7 +1038,7 @@ int main(int argc, char *argv[]) {
if (fwrite(digest, 1, 16, f) != 16)
error("couldn't write md5sum to file '%s'", argv[1]);
fclose(f);
-
+
return 0;
}
@@ -1055,7 +1055,7 @@ bool process(PAKFile &out, const Game *g, const byte *data, const uint32 size) {
fprintf(stderr, "ERROR: couldn't get filename for id %d\n", i->id);
return false;
}
-
+
const ExtractFilename *fDesc = getFilenameDesc(i->id);
if (!fDesc) {
@@ -1064,16 +1064,16 @@ bool process(PAKFile &out, const Game *g, const byte *data, const uint32 size) {
}
const ExtractType *tDesc = findExtractType(fDesc->type);
-
+
if (!tDesc) {
fprintf(stderr, "ERROR: couldn't find type description for id %d\n", i->id);
return false;
}
-
+
PAKFile::cFileList *list = out.getFileList();
if (list && list->findEntry(filename) != 0)
continue;
-
+
int patch = 0;
if (g->special == kFMTownsVersionE || g->special == kFMTownsVersionJ) {
// FM Towns files that need addional patches
@@ -1081,14 +1081,14 @@ bool process(PAKFile &out, const Game *g, const byte *data, const uint32 size) {
i->id == kThePoisonStrings || i->id == kFluteStrings || i->id == kWispJewelStrings)
patch = 1;
else if (i->id == kIntroStrings || i->id == kKyra1TownsSFXwdTable)
- patch = 2;
+ patch = 2;
}
if (g->special == k2TownsFile1E || g->special == k2TownsFile1J) {
if (i->id == k2SeqplayStrings)
patch = 3;
}
-
+
if (g->special == k2FloppyFile2) {
if (i->id == k2IngamePakFiles)
patch = 4;
@@ -1097,8 +1097,8 @@ bool process(PAKFile &out, const Game *g, const byte *data, const uint32 size) {
if (g->special == k2FloppyFile2 || g->special == k2CDFile2E) {
if (i->id == k2IngameSfxFiles)
patch = 5;
- }
-
+ }
+
if (!tDesc->extract(out, g, data + i->startOff, i->endOff - i->startOff, filename, patch)) {
fprintf(stderr, "ERROR: couldn't extract id %d\n", i->id);
return false;
@@ -1140,11 +1140,11 @@ const Game *findGame(const byte *buffer, const uint32 size) {
md5_starts(&ctx);
md5_update(&ctx, buffer, size);
md5_finish(&ctx, digest);
-
+
for (int j = 0; j < 16; ++j) {
sprintf(md5str + j*2, "%02x", (int)digest[j]);
}
-
+
for (const Game **i = gameDescs; *i != 0; ++i) {
for (const Game *p = *i; p->game != -1; ++p) {
if (strcmp(md5str, p->md5) == 0)
diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h
index 85c5f8973d..9a5c2ce033 100644
--- a/tools/create_kyradat/create_kyradat.h
+++ b/tools/create_kyradat/create_kyradat.h
@@ -62,7 +62,7 @@ enum kExtractID {
kAudioTracks,
kAudioTracksIntro,
-
+
kItemNames,
kTakenStrings,
kPlacedStrings,
@@ -85,7 +85,7 @@ enum kExtractID {
kVeryCleverString,
kNewGameString,
-
+
kDefaultShapes,
kHealing1Shapes,
kHealing2Shapes,
@@ -135,7 +135,7 @@ enum kExtractID {
kGUIStrings,
kConfigStrings,
-
+
kKyra1TownsSFXwdTable,
kKyra1TownsSFXbtTable,
kKyra1TownsCDATable,
@@ -158,7 +158,7 @@ enum kExtractID {
k2IngameSfxIndex,
k2IngameTracks,
k2IngameCDA,
-
+
kMaxResIDs
};
diff --git a/tools/create_kyradat/hof_floppy.h b/tools/create_kyradat/hof_floppy.h
index c446b513b4..a4aee16ced 100644
--- a/tools/create_kyradat/hof_floppy.h
+++ b/tools/create_kyradat/hof_floppy.h
@@ -59,6 +59,6 @@ const Game kyra2FloppyGames[] = {
{ kKyra2, DE_DEU, k2FloppyFile1, "0ca4f9a1438264a4c63c3218e064ed3b", kyra2File1G},
{ kKyra2, EN_ANY, k2FloppyFile2, "7c3eadbe5122722cf2e5e1611e19dfb9", kyra2File2E},
{ kKyra2, FR_FRA, k2FloppyFile2, "fc2c6782778e6c6d5a553d1cb73c98ad", kyra2File2F},
- { kKyra2, DE_DEU, k2FloppyFile2, "0d9b0eb7b0ad889ec942d74d80dde1bf", kyra2File2G},
+ { kKyra2, DE_DEU, k2FloppyFile2, "0d9b0eb7b0ad889ec942d74d80dde1bf", kyra2File2G},
GAME_DUMMY_ENTRY
};
diff --git a/tools/create_kyradat/hof_towns.h b/tools/create_kyradat/hof_towns.h
index 5455e153bb..e6f3d11197 100644
--- a/tools/create_kyradat/hof_towns.h
+++ b/tools/create_kyradat/hof_towns.h
@@ -17,7 +17,7 @@ const ExtractEntry kyra2File2FMTownsE[] = {
{ k2IngamePakFiles, 0x00000540, 0x0000065C },
{ k2IngameSfxFiles, 0x00003E3C, 0x000047A3 },
{ k2IngameSfxIndex, 0x00013980, 0x00013CD8 },
- { k2IngameCDA, 0x0001808C, 0x000181BC },
+ { k2IngameCDA, 0x0001808C, 0x000181BC },
{ -1, 0, 0 }
};
diff --git a/tools/create_kyradat/md5.cpp b/tools/create_kyradat/md5.cpp
index 8f23d2c958..73ec80d9b0 100644
--- a/tools/create_kyradat/md5.cpp
+++ b/tools/create_kyradat/md5.cpp
@@ -243,7 +243,7 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length) {
md5_starts(&ctx);
-
+
while ((i = (uint32)fread(buf, 1, readlen, f)) > 0) {
md5_update(&ctx, buf, i);
diff --git a/tools/create_kyradat/pak.cpp b/tools/create_kyradat/pak.cpp
index 63e9792d23..f3446df291 100644
--- a/tools/create_kyradat/pak.cpp
+++ b/tools/create_kyradat/pak.cpp
@@ -39,21 +39,21 @@ bool PAKFile::loadFile(const char *file, const bool isAmiga) {
// TODO: get rid of temp. buffer
uint8 *buffer = new uint8[filesize];
assert(buffer);
-
+
fread(buffer, filesize, 1, pakfile);
-
+
fclose(pakfile);
-
+
const char *currentName = 0;
-
+
uint32 startoffset = _isAmiga ? READ_BE_UINT32(buffer) : READ_LE_UINT32(buffer);
uint32 endoffset = 0;
uint8* position = buffer + 4;
-
+
while (true) {
uint32 strlgt = strlen((const char*)position);
currentName = (const char*)position;
-
+
if (!(*currentName))
break;
@@ -65,19 +65,19 @@ bool PAKFile::loadFile(const char *file, const bool isAmiga) {
endoffset = filesize;
}
position += 4;
-
+
uint8 *data = new uint8[endoffset - startoffset];
assert(data);
memcpy(data, buffer + startoffset, endoffset - startoffset);
addFile(currentName, data, endoffset - startoffset);
data = 0;
-
+
if (endoffset == filesize)
break;
-
+
startoffset = endoffset;
}
-
+
delete [] buffer;
return true;
}
@@ -91,11 +91,11 @@ bool PAKFile::saveFile(const char *file) {
error("couldn't open file '%s' for writing", file);
return false;
}
-
+
// TODO: implement error handling
uint32 startAddr = _fileList->getTableSize()+5+4;
static const char *zeroName = "\0\0\0\0\0";
-
+
uint32 curAddr = startAddr;
for (FileList *cur = _fileList; cur; cur = cur->next) {
if (_isAmiga)
@@ -110,11 +110,11 @@ bool PAKFile::saveFile(const char *file) {
else
writeUint32LE(f, curAddr);
fwrite(zeroName, 1, 5, f);
-
+
for (FileList *cur = _fileList; cur; cur = cur->next)
fwrite(cur->data, 1, cur->size, f);
-
- fclose(f);
+
+ fclose(f);
return true;
}
@@ -176,7 +176,7 @@ const uint8 *PAKFile::getFileData(const char *file, uint32 *size) {
if (!cur)
return 0;
-
+
if (size)
*size = cur->size;
return cur->data;
@@ -187,13 +187,13 @@ bool PAKFile::addFile(const char *name, const char *file) {
error("entry '%s' already exists");
return false;
}
-
+
FILE *f = fopen(file, "rb");
if (!f) {
error("couldn't open file '%s'", file);
return false;
}
-
+
uint32 filesize = fileSize(f);
uint8 *data = new uint8[filesize];
assert(data);
@@ -201,7 +201,7 @@ bool PAKFile::addFile(const char *name, const char *file) {
error("couldn't read from file '%s'", file);
return false;
}
- fclose(f);
+ fclose(f);
return addFile(name, data, filesize);
}
diff --git a/tools/create_kyradat/pak.h b/tools/create_kyradat/pak.h
index f81e0be011..1634411f4c 100644
--- a/tools/create_kyradat/pak.h
+++ b/tools/create_kyradat/pak.h
@@ -34,7 +34,7 @@ public:
bool loadFile(const char *file, const bool isAmiga);
bool saveFile(const char *file);
void clearFile() { delete _fileList; _fileList = 0; }
-
+
const uint32 getFileSize() const { return _fileList->getTableSize()+5+4+_fileList->getFileSize(); }
void drawFileList();
@@ -47,7 +47,7 @@ public:
bool addFile(const char *name, const char *file);
bool addFile(const char *name, uint8 *data, uint32 size);
-
+
bool removeFile(const char *name);
public:
struct FileList {
@@ -57,7 +57,7 @@ public:
delete [] data;
delete next;
}
-
+
FileList *findEntry(const char *f) {
for (FileList *cur = this; cur; cur = cur->next) {
if (scumm_stricmp(cur->filename, f) != 0)
@@ -66,7 +66,7 @@ public:
}
return 0;
}
-
+
const FileList *findEntry(const char *f) const {
for (const FileList *cur = this; cur; cur = cur->next) {
if (scumm_stricmp(cur->filename, f) != 0)
@@ -92,12 +92,12 @@ public:
char *filename;
uint32 size;
uint8 *data;
-
+
FileList *next;
};
typedef const FileList cFileList;
-
+
cFileList *getFileList() const { return _fileList; }
private:
FileList *_fileList;
diff --git a/tools/create_kyradat/towns.h b/tools/create_kyradat/towns.h
index 4df7c05b0e..4e632ec571 100644
--- a/tools/create_kyradat/towns.h
+++ b/tools/create_kyradat/towns.h
@@ -10,12 +10,12 @@ const ExtractEntry kyra1FMTownsE[] = {
{ kIntroCOLStrings, 0x00027E06, 0x00027E36 },
{ kIntroStrings, 0x00027E36, 0x0002837B },
{ kRoomList, 0x0002FF90, 0x00036478 },
- { kRoomFilenames, 0x00028B20, 0x00028E6C},
+ { kRoomFilenames, 0x00028B20, 0x00028E6C},
{ kCharacterImageFilenames, 0x0002606E, 0x00026165 },
{ kDefaultShapes, 0x00037CF9, 0x00038183 },
- { kItemNames, 0x00029724, 0x00029C29 },
+ { kItemNames, 0x00029724, 0x00029C29 },
{ kTakenStrings, 0x00028978, 0x00028994 },
- { kPlacedStrings, 0x000289A0, 0x000289A9 },
+ { kPlacedStrings, 0x000289A0, 0x000289A9 },
{ kDroppedStrings, 0x000289E4, 0x000289EE },
{ kNoDropStrings, 0x00027C0E, 0x00027C88 },
{ kAmuleteAnimSeq, 0x0002A814, 0x0002A83E },
@@ -52,7 +52,7 @@ const ExtractEntry kyra1FMTownsE[] = {
{ kPaletteList31, 0x0002ED27, 0x0002ED4E },
{ kPaletteList32, 0x0002ED4F, 0x0002ED76 },
{ kPaletteList33, 0x0002ED77, 0x0002EDB3 },
- { kPutDownString, 0x00025BD6, 0x00025BFC },
+ { kPutDownString, 0x00025BD6, 0x00025BFC },
{ kWaitAmuletString, 0x00025C2A, 0x00025C67 },
{ kBlackJewelString, 0x00025C96, 0x00025CB9 },
{ kHealingTipString, 0x00025CF2, 0x00025D1F },
@@ -89,13 +89,13 @@ const ExtractEntry kyra1FMTownsE[] = {
};
const ExtractEntry kyra1FMTownsJ[] = {
- { kIntroStrings, 0x0002837C, 0x00028977 },
- { kItemNames, 0x00029C2C, 0x0002A1B3 },
+ { kIntroStrings, 0x0002837C, 0x00028977 },
+ { kItemNames, 0x00029C2C, 0x0002A1B3 },
{ kTakenStrings, 0x00028980, 0x0002899F },
- { kPlacedStrings, 0x000289AC, 0x000289B9 },
+ { kPlacedStrings, 0x000289AC, 0x000289B9 },
{ kDroppedStrings, 0x000289F0, 0x000289FB },
{ kNoDropStrings, 0x00027C3E, 0x00027C9F },
- { kPutDownString, 0x00025BFE, 0x00025C27 },
+ { kPutDownString, 0x00025BFE, 0x00025C27 },
{ kWaitAmuletString, 0x00025C6A, 0x00025C93 },
{ kBlackJewelString, 0x00025CBA, 0x00025CEF },
{ kHealingTipString, 0x00025D22, 0x00025D4D },
diff --git a/tools/create_kyradat/util.h b/tools/create_kyradat/util.h
index c22e07f523..8ce6e8acb2 100644
--- a/tools/create_kyradat/util.h
+++ b/tools/create_kyradat/util.h
@@ -80,7 +80,7 @@ typedef uint8 bool;
#define START_PACK_STRUCTS pack(push, 1)
#define END_PACK_STRUCTS pack(pop)
-
+
#elif defined(__MINGW32__)
#define scumm_stricmp stricmp
diff --git a/tools/create_lure/create_lure_dat.cpp b/tools/create_lure/create_lure_dat.cpp
index a89593d9c5..445a65fb80 100644
--- a/tools/create_lure/create_lure_dat.cpp
+++ b/tools/create_lure/create_lure_dat.cpp
@@ -22,8 +22,8 @@
* $Id$
*
* This is a utility for extracting needed resource data from different language
- * version of the Lure of the Temptress lure.exe executable files into a new file
- * lure.dat - this file is required for the ScummVM Lure of the Temptress module
+ * version of the Lure of the Temptress lure.exe executable files into a new file
+ * lure.dat - this file is required for the ScummVM Lure of the Temptress module
* to work properly
*/
@@ -92,16 +92,16 @@ AnimListRecord animDataList[] = {
{{0x5647, 0x5707, 0x5727, 0x5757, 0x5727}}, // Pig recoiling from hit
{{0x5650, 0x5710, 0x5730, 0x5760, 0x5730}}, // Pig dies
{{0x5810, 0x58D0, 0x58F0, 0x5920, 0x58f0}}, // Voice bubble
- {{0x5915, 0x59D5, 0x59F5, 0x5a25, 0x59f5}}, // Blacksmith hammering
+ {{0x5915, 0x59D5, 0x59F5, 0x5a25, 0x59f5}}, // Blacksmith hammering
{{0x59E4, 0x5AA4, 0x5AC4, 0x5af4, 0x5ac4}}, // Ewan's standard animation
{{0x59ED, 0x5AAD, 0x5ACD, 0x5afd, 0x5acd}}, // Ewan's alternate animation
{{0x59FF, 0x5ABF, 0x5ADF, 0x5b0f, 0x5adf}}, // Dragon breathing fire
{{0x5A08, 0x5AC8, 0x5AE8, 0x5b18, 0x5af1}}, // Dragon breathing fire 2
{{0x5A11, 0x5AD1, 0x5AF1, 0x5b21, 0x5af1}}, // Dragon breathing fire 3
{{0x5A1A, 0x5ADA, 0x5AFA, 0x5b2a, 0x5afa}}, // Player turning winch in room #48
- {{0x5A59, 0x5B19, 0x5B39, 0x5b69, 0x5b39}}, // Player pulling lever in room #48
+ {{0x5A59, 0x5B19, 0x5B39, 0x5b69, 0x5b39}}, // Player pulling lever in room #48
{{0x5A62, 0x5B22, 0x5B42, 0x5b72, 0x5b42}}, // Minnow pulling lever in room #48
- {{0x5AAA, 0x5B6A, 0x5B8A, 0x5bba, 0x5b8a}}, // Goewin mixing potion
+ {{0x5AAA, 0x5B6A, 0x5B8A, 0x5bba, 0x5b8a}}, // Goewin mixing potion
{{0x5C80, 0x5D40, 0x5D60, 0x5d90, 0x5d60}}, // Player standard animation
{{0x5C95, 0x5D55, 0x5D75, 0x5da5, 0x5d75}}, // Player operating rack
{{0x5CAA, 0x5D6A, 0x5D8A, 0x5dba, 0x5d8a}}, // Selena animation
@@ -232,7 +232,7 @@ void read_room_data(byte *&data, uint16 &totalSize) {
break;
case FR_FRA:
dataStart = 0xc020;
- walkAreaOffset = 0x2ed0;
+ walkAreaOffset = 0x2ed0;
break;
case DE_DEU:
dataStart = 0xc050;
@@ -251,7 +251,7 @@ void read_room_data(byte *&data, uint16 &totalSize) {
lureExe.seek(dataSegment + dataStart + index * 9);
lureExe.read(&headerEntry, sizeof(RoomHeaderEntry));
- if ((FROM_LE_16(headerEntry.offset) != 0) &&
+ if ((FROM_LE_16(headerEntry.offset) != 0) &&
(FROM_LE_16(headerEntry.offset) != 0xffff) &&
(FROM_LE_16(headerEntry.roomNumber) != 0)) {
// Store offset of room entry
@@ -263,13 +263,13 @@ void read_room_data(byte *&data, uint16 &totalSize) {
RoomResourceOutput *rec = (RoomResourceOutput *) (data + offset);
rec->hdrFlags = headerEntry.hdrFlags;
rec->actions = FROM_LE_32(buffer.actions);
- rec->roomNumber = index;
+ rec->roomNumber = index;
rec->descId = headerEntry.descId;
rec->numLayers = buffer.numLayers;
memcpy(rec->layers, buffer.layers, 8);
- rec->sequenceOffset = buffer.sequenceOffset;
+ rec->sequenceOffset = buffer.sequenceOffset;
rec->clippingXStart = TO_LE_16(FROM_LE_16(buffer.clippingXStart) - 0x80);
- rec->clippingXEnd = (FROM_LE_16(buffer.clippingXEnd) == 0) ? 0 :
+ rec->clippingXEnd = (FROM_LE_16(buffer.clippingXEnd) == 0) ? 0 :
TO_LE_16(FROM_LE_16(buffer.clippingXEnd) - 0x80);
rec->exitTime = FROM_LE_32(buffer.exitTime);
rec->areaFlag = buffer.areaFlag;
@@ -283,7 +283,7 @@ void read_room_data(byte *&data, uint16 &totalSize) {
lureExe.read(p, sizeof(RoomResourceExit1));
if (FROM_LE_16(p->xs) == 0xffff) break;
- if (++rec->numExits == 255)
+ if (++rec->numExits == 255)
errorExit("Too many rooms read in");
p->xs = TO_LE_16(FROM_LE_16(p->xs) - 0x80);
@@ -310,7 +310,7 @@ void read_room_data(byte *&data, uint16 &totalSize) {
// Handle the random destination walk bounds for the room
- lureExe.seek(dataSegment + walkAreaOffset +
+ lureExe.seek(dataSegment + walkAreaOffset +
buffer.walkBoundsIndex * sizeof(RoomRectIn));
lureExe.read(&bounds, sizeof(RoomRectIn));
rec->walkBounds.xs = TO_LE_16(FROM_LE_16(bounds.xs) - 0x80);
@@ -338,38 +338,38 @@ uint16 englishTickProcOffsets[] = {
0x41BD, 0x4f82, 0x5e44, 0x625e, 0x6571, 0x7207, 0x7c14, 0x7c24, 0x7efa, 0x7f02,
0x7F37, 0x7f3a, 0x7f54, 0x7f69, 0x7fa1, 0x8009, 0x80c6, 0x813f, 0x8180, 0x81b3,
0x81f3, 0x820e, 0x8241, 0x82a0, 0x85ce, 0x862d, 0x865A, 0x86FA, 0x86FF, 0x871E,
- 0x873D, 0x8742, 0x8747, 0x87B3, 0x87EC, 0x882A, 0x8ABD, 0x982D, 0x98B6,
+ 0x873D, 0x8742, 0x8747, 0x87B3, 0x87EC, 0x882A, 0x8ABD, 0x982D, 0x98B6,
0xffff
};
uint16 italianTickProcOffsets[] = {
0x4205, 0x4fca, 0x5e8c, 0x62a6, 0x65b9, 0x724f, 0x7c5c, 0x7c6c, 0x7f58, 0x7f60,
- 0x7f95, 0x7f98, 0x7fb2, 0x7fc7, 0x7fff, 0x8067, 0x8124, 0x819d, 0x81de, 0x8211,
- 0x8251, 0x826c, 0x829f, 0x82fe, 0x862c, 0x868b, 0x86b8, 0x8758, 0x875D, 0x877C,
- 0x879B, 0x87a0, 0x87a5, 0x8811, 0x884a, 0x8888, 0x8b20, 0x988f, 0x9918,
+ 0x7f95, 0x7f98, 0x7fb2, 0x7fc7, 0x7fff, 0x8067, 0x8124, 0x819d, 0x81de, 0x8211,
+ 0x8251, 0x826c, 0x829f, 0x82fe, 0x862c, 0x868b, 0x86b8, 0x8758, 0x875D, 0x877C,
+ 0x879B, 0x87a0, 0x87a5, 0x8811, 0x884a, 0x8888, 0x8b20, 0x988f, 0x9918,
0xffff
};
uint16 frenchTickProcOffsets[] = {
- 0x457b, 0x5340, 0x6202, 0x661c, 0x692f, 0x75fb, 0x8008, 0x8018, 0x82f8, 0x8300,
- 0x8335, 0x8338, 0x8352, 0x8367, 0x839f, 0x8407, 0x84c4, 0x853d, 0x857e, 0x85b1,
- 0x85f1, 0x860c, 0x863f, 0x869e, 0x89cf, 0x8a2e, 0x8a5b, 0x8afb, 0x8b00, 0x8b1f,
+ 0x457b, 0x5340, 0x6202, 0x661c, 0x692f, 0x75fb, 0x8008, 0x8018, 0x82f8, 0x8300,
+ 0x8335, 0x8338, 0x8352, 0x8367, 0x839f, 0x8407, 0x84c4, 0x853d, 0x857e, 0x85b1,
+ 0x85f1, 0x860c, 0x863f, 0x869e, 0x89cf, 0x8a2e, 0x8a5b, 0x8afb, 0x8b00, 0x8b1f,
0x8b3e, 0x8b43, 0x8b48, 0x8bb4, 0x8bed, 0x8c26, 0x8ebe, 0x9c41, 0x9cca,
0xffff
};
uint16 germanTickProcOffsets[] = {
- 0x4543, 0x5308, 0x61ca, 0x65e4, 0x68fa, 0x7591, 0x7f9e, 0x7fae, 0x8358, 0x8360,
- 0x8395, 0x8398, 0x83b2, 0x83c7, 0x83ff, 0x8467, 0x8524, 0x859d, 0x85de, 0x8611,
- 0x8651, 0x866c, 0x869f, 0x86fe, 0x8a2c, 0x8a8b, 0x8ab8, 0x8b58, 0x8b5d, 0x8b7c,
+ 0x4543, 0x5308, 0x61ca, 0x65e4, 0x68fa, 0x7591, 0x7f9e, 0x7fae, 0x8358, 0x8360,
+ 0x8395, 0x8398, 0x83b2, 0x83c7, 0x83ff, 0x8467, 0x8524, 0x859d, 0x85de, 0x8611,
+ 0x8651, 0x866c, 0x869f, 0x86fe, 0x8a2c, 0x8a8b, 0x8ab8, 0x8b58, 0x8b5d, 0x8b7c,
0x8b9b, 0x8ba0, 0x8ba5, 0x8c11, 0x8c4a, 0x8c83, 0x8f1a, 0x9c9b, 0x9d24,
0xffff
};
uint16 spanishTickProcOffsets[] = {
- 0x4247, 0x500c, 0x5ece, 0x62e8, 0x65fb, 0x7291, 0x7c9e, 0x7cae, 0x7fbe, 0x7fc6,
- 0x7ffb, 0x7ffe, 0x8018, 0x802d, 0x8065, 0x80cd, 0x818a, 0x8203, 0x8244, 0x8277,
- 0x82b7, 0x82d2, 0x8305, 0x8364, 0x8692, 0x86f1, 0x871e, 0x87be, 0x87c3, 0x87e2,
+ 0x4247, 0x500c, 0x5ece, 0x62e8, 0x65fb, 0x7291, 0x7c9e, 0x7cae, 0x7fbe, 0x7fc6,
+ 0x7ffb, 0x7ffe, 0x8018, 0x802d, 0x8065, 0x80cd, 0x818a, 0x8203, 0x8244, 0x8277,
+ 0x82b7, 0x82d2, 0x8305, 0x8364, 0x8692, 0x86f1, 0x871e, 0x87be, 0x87c3, 0x87e2,
0x8801, 0x8806, 0x880b, 0x8877, 0x88b0, 0x88ee, 0x8b86, 0x98f5, 0x997e,
0xffff
};
@@ -425,7 +425,7 @@ void read_hotspot_data(byte *&data, uint16 &totalSize) {
procList = &germanTickProcOffsets[0];
walkToOffset = 0xBD5B;
loadOffsets = &germanLoadOffsets[0];
- break;
+ break;
case ES_ESP:
offsets = &spanishOffsets[0];
procList = &spanishTickProcOffsets[0];
@@ -475,14 +475,14 @@ void read_hotspot_data(byte *&data, uint16 &totalSize) {
memset(r, 0, sizeof(HotspotResourceOutput));
r->hotspotId = TO_LE_16(startId[tableNum] + hotspotIndex);
r->nameId = entryHeader.resourceId;
- r->descId = entryHeader.descId;
+ r->descId = entryHeader.descId;
r->descId2 = entryHeader.descId2;
r->hdrFlags = entryHeader.hdrFlags;
// Get the hotspot data
lureExe.seek(dataSegment + entryHeader.offset);
lureExe.read(&entry, sizeof(HotspotResource));
-
+
r->actions = entry.actions;
r->roomNumber = entry.roomNumber;
r->startX = TO_LE_16(FROM_LE_16(entry.startX) - 0x80);
@@ -519,7 +519,7 @@ void read_hotspot_data(byte *&data, uint16 &totalSize) {
++loadIndex;
if (loadOffsets[loadIndex] == 0) {
- printf("Unknown load offset encountered for hotspot %xh offset %xh\n",
+ printf("Unknown load offset encountered for hotspot %xh offset %xh\n",
startId[tableNum] + hotspotIndex,
FROM_LE_16(entry.loadOffset));
exit(1);
@@ -540,7 +540,7 @@ void read_hotspot_data(byte *&data, uint16 &totalSize) {
if (procList[procIndex] == 0xffff) {
if ((FROM_LE_16(entry.tickProcOffset) != 0xe00) &&
(FROM_LE_16(entry.tickProcOffset) != 2))
-// printf("Could not find a tick proc handler for hotspot %xh offset %xh\n",
+// printf("Could not find a tick proc handler for hotspot %xh offset %xh\n",
// startId[tableNum] + hotspotIndex,
printf("%xh,\n",
FROM_LE_16(entry.tickProcOffset));
@@ -550,7 +550,7 @@ printf("%xh,\n",
r->tickProcId = TO_LE_16(procIndex + 1);
}
- // WORKAROUND: Special check for the tinderbox hotspot to set it's room number correctly - the original
+ // WORKAROUND: Special check for the tinderbox hotspot to set it's room number correctly - the original
// game used this as a backup against people trying to hack the copy protection
if (currentHotspotId == 0x271C)
r->roomNumber = TO_LE_16(28);
@@ -567,7 +567,7 @@ printf("%xh,\n",
break;
++walkCtr;
}
-
+
if (walkCtr == walkNumEntries) {
r->walkX = 0;
r->walkY = 0;
@@ -578,7 +578,7 @@ printf("%xh,\n",
// WORKAROUND: Edwina's walk-to position is actually inside the table, which meant that walking over
// to her could fail, depending on your start position. This increments it into the clear
int tempY = (int16) (y & 0x7fff) - 0x80;
- if (currentHotspotId == 0x442)
+ if (currentHotspotId == 0x442)
tempY += 8;
r->walkY = TO_LE_16((y & 0x8000) | (uint16) tempY);
}
@@ -601,7 +601,7 @@ printf("%xh,\n",
lureExe.seek(dataSegment + entryHeader.offset + 0x63);
lureExe.read(&action, sizeof(CurrentActionInput));
- if (action.action != 2)
+ if (action.action != 2)
r->npcSchedule = 0;
else {
r->npcSchedule = get_sequence_index(FROM_LE_16(action.dataOffset));
@@ -626,7 +626,7 @@ printf("%xh,\n",
free(walkList);
}
-void read_hotspot_override_data(byte *&data, uint16 &totalSize)
+void read_hotspot_override_data(byte *&data, uint16 &totalSize)
{
lureExe.seek(dataSegment + HOTSPOT_OVERRIDE_OFFSET);
int numOverrides = 0;
@@ -695,7 +695,7 @@ void read_room_exits(byte *&data, uint16 &totalSize) {
uint16 *offset = (uint16 *) data;
uint16 destIndex = (NUM_ROOM_EXITS + 1) * sizeof(uint16);
uint16 entryCtr;
-
+
// Loop to build up the result table
for (roomCtr = 0; roomCtr < NUM_ROOM_EXITS; ++roomCtr) {
@@ -705,7 +705,7 @@ void read_room_exits(byte *&data, uint16 &totalSize) {
// Read in the entries for the room
*offset++ = TO_LE_16(destIndex);
- RoomExitHotspotOutputRecord *destP = (RoomExitHotspotOutputRecord *)
+ RoomExitHotspotOutputRecord *destP = (RoomExitHotspotOutputRecord *)
(data + destIndex);
lureExe.seek(dataSegment + offsets[roomCtr]);
@@ -722,7 +722,7 @@ void read_room_exits(byte *&data, uint16 &totalSize) {
destP->cursorNum = rec.cursorNum;
destP->destRoomNumber = rec.destRoomNumber;
}
-
+
destIndex += numEntries[roomCtr] * sizeof(RoomExitHotspotOutputRecord);
WRITE_LE_UINT16(data + destIndex, 0xffff);
destIndex += sizeof(uint16);
@@ -738,7 +738,7 @@ void read_room_exit_joins(byte *&data, uint16 &totalSize) {
uint16 dataStart = 0xce30;
if (language == IT_ITA) dataStart = 0xcef0;
- else if (language == FR_FRA) dataStart = 0xcf10;
+ else if (language == FR_FRA) dataStart = 0xcf10;
else if (language == DE_DEU) dataStart = 0xcf40;
else if (language == ES_ESP) dataStart = 0xcf10;
else if (language != EN_ANY) errorExit("read_room_exit_joins: Unknown language");
@@ -756,7 +756,7 @@ void read_room_exit_joins(byte *&data, uint16 &totalSize) {
totalSize = (numRecords * sizeof(RoomExitHotspotJoinRecord)) + 2;
data = (byte *) malloc(totalSize);
lureExe.seek(dataSegment + dataStart);
-
+
p = (RoomExitHotspotJoinRecord *) data;
for (int recordCtr = 0; recordCtr < numRecords; ++recordCtr)
{
@@ -785,7 +785,7 @@ void read_anim_data(byte *&data, uint16 &totalSize) {
lureExe.seek(dataSegment + animOffsets[ctr]);
lureExe.read(&inRec, sizeof(AnimRecord));
- if ((FROM_LE_16(inRec.leftOffset) < 0x5000) ||
+ if ((FROM_LE_16(inRec.leftOffset) < 0x5000) ||
(FROM_LE_16(inRec.rightOffset) < 0x5000) ||
(abs(FROM_LE_16(inRec.leftOffset)-FROM_LE_16(inRec.rightOffset)) > 0x800) ||
(abs(FROM_LE_16(inRec.rightOffset)-FROM_LE_16(inRec.upOffset)) > 0x800) ||
@@ -837,7 +837,7 @@ void read_anim_data(byte *&data, uint16 &totalSize) {
rec->animId = inRec.animId;
rec->flags = TO_LE_16(inRec.flags);
- rec->leftOffset = 0;
+ rec->leftOffset = 0;
rec->rightOffset = 0;
rec->upOffset = 0;
rec->downOffset = 0;
@@ -875,7 +875,7 @@ void read_anim_data(byte *&data, uint16 &totalSize) {
++destMove;
lureExe.read(&move, sizeof(MovementRecord));
}
-
+
destMove->frameNumber = TO_LE_16(0xffff);
moveOffset += 2;
}
@@ -897,7 +897,7 @@ void read_script_data(byte *&data, uint16 &totalSize) {
else if (language == ES_ESP) segmentOffset = 0x1e0b0;
else if (language != EN_ANY) errorExit("read_script_data: Unknown language");
lureExe.seek(segmentOffset);
-
+
totalSize = SCRIPT_SEGMENT_SIZE;
data = (byte *) malloc(totalSize);
lureExe.read(data, totalSize);
@@ -911,7 +911,7 @@ void read_script2_data(byte *&data, uint16 &totalSize) {
else if (language == ES_ESP) segmentOffset = 0x19e20;
else if (language != EN_ANY) errorExit("read_script2_data: Unknown language");
lureExe.seek(segmentOffset);
-
+
totalSize = SCRIPT2_SEGMENT_SIZE;
data = (byte *) malloc(totalSize);
lureExe.read(data, totalSize);
@@ -971,10 +971,10 @@ void read_actions_list(byte *&data, uint16 &totalSize) {
header->recordId = TO_LE_16(0xffff);
}
-// Reads in the talk data
+// Reads in the talk data
void add_talk_offset(uint16 offset) {
- for (int ctr = 0; ctr < talkOffsetIndex; ++ctr)
+ for (int ctr = 0; ctr < talkOffsetIndex; ++ctr)
if (talkOffsets[ctr] == offset) return;
if (talkOffsetIndex == MAX_TALK_LISTS) {
printf("Exceeded maximum talk offset list size\n");
@@ -1010,7 +1010,7 @@ void read_talk_headers(byte *&data, uint16 &totalSize) {
currVal = 0xffff;
for (subentryCtr = 0; subentryCtr < TALK_NUM_ENTRIES; ++subentryCtr) {
if ((FROM_LE_16(entries[subentryCtr].offset) < currVal) &&
- (FROM_LE_16(entries[subentryCtr].offset) > prevVal))
+ (FROM_LE_16(entries[subentryCtr].offset) > prevVal))
currVal = FROM_LE_16(entries[subentryCtr].offset);
}
if (currVal == 0xffff) break;
@@ -1019,7 +1019,7 @@ void read_talk_headers(byte *&data, uint16 &totalSize) {
prevVal = currVal;
}
- // Assume that the last talk header will have the same number of entries across language versions,
+ // Assume that the last talk header will have the same number of entries across language versions,
// so create an end address based on the start of the last entry using start/end from English version
sortedOffsets[entryCtr] = sortedOffsets[entryCtr - 1] + (0x5540 - 0x5504);
@@ -1041,7 +1041,7 @@ void read_talk_headers(byte *&data, uint16 &totalSize) {
break;
}
}
- if (nextOffset == 0)
+ if (nextOffset == 0)
exit(1);
// Read in line entries into the data
@@ -1051,7 +1051,7 @@ void read_talk_headers(byte *&data, uint16 &totalSize) {
lureExe.read(talkOffset, size);
while (size > 0) {
- if (READ_UINT16(talkOffset) != 0)
+ if (READ_UINT16(talkOffset) != 0)
add_talk_offset(READ_UINT16(talkOffset));
size -= sizeof(uint16);
offset += sizeof(uint16);
@@ -1115,7 +1115,7 @@ void read_talk_data(byte *&data, uint16 &totalSize) {
currVal = 0xffff;
for (subentryCtr = 0; subentryCtr < talkOffsetIndex; ++subentryCtr) {
if ((talkOffsets[subentryCtr] < currVal) &&
- (talkOffsets[subentryCtr] > prevVal))
+ (talkOffsets[subentryCtr] > prevVal))
currVal = talkOffsets[subentryCtr];
}
if (currVal == 0xffff) break;
@@ -1134,7 +1134,7 @@ void read_talk_data(byte *&data, uint16 &totalSize) {
header->recordId = startOffset;
header->listOffset = offset;
-
+
lureExe.seek(dataSegment + startOffset);
responseOffset = lureExe.readWord();
startOffset += 2;
@@ -1173,7 +1173,7 @@ void read_talk_data(byte *&data, uint16 &totalSize) {
for (subentryCtr = 0; subentryCtr < numTalks; ++subentryCtr) {
if ((responseOffset >= sortedList[subentryCtr]) &&
(responseOffset < sortedList[subentryCtr+1])) {
- // Found a record
+ // Found a record
nextOffset = sortedList[subentryCtr+1];
break;
}
@@ -1182,7 +1182,7 @@ void read_talk_data(byte *&data, uint16 &totalSize) {
printf("Failure reading talk data: no response found\n");
exit(1);
}
-
+
size = nextOffset - responseOffset;
if ((size % 6) != 0) size -= (size % 6);
@@ -1212,20 +1212,20 @@ void read_room_pathfinding_data(byte *&data, uint16 &totalSize) {
else if (language == ES_ESP) dataStart = 0x992A;
else if (language != EN_ANY) errorExit("read_room_pathfinding_data: Unknown language");
lureExe.seek(dataSegment + dataStart);
-
+
totalSize = PATHFIND_SIZE;
data = (byte *) malloc(totalSize);
lureExe.read(data, totalSize);
}
-void read_room_exit_coordinate_data(byte *&data, uint16 &totalSize)
+void read_room_exit_coordinate_data(byte *&data, uint16 &totalSize)
{
- // Read in the exit coordinates list
+ // Read in the exit coordinates list
int roomNum, entryNum;
uint16 x, y;
RoomExitCoordinateEntryInputResource dataIn;
- totalSize = EXIT_COORDINATES_NUM_ROOMS * sizeof(RoomExitCoordinateEntryOutputResource) + 2;
+ totalSize = EXIT_COORDINATES_NUM_ROOMS * sizeof(RoomExitCoordinateEntryOutputResource) + 2;
data = (byte *) malloc(totalSize);
lureExe.seek(dataSegment + EXIT_COORDINATES_OFFSET);
WRITE_LE_UINT16(data + totalSize - 2, 0xffff);
@@ -1253,7 +1253,7 @@ void read_room_exit_coordinate_data(byte *&data, uint16 &totalSize)
rec->roomIndex[entryNum] = TO_LE_16(FROM_LE_16(dataIn.roomIndex[entryNum]) / 6);
}
- // WORKAROUND: Bugfix for the original game data to get to room #27 via rooms #10 or #11
+ // WORKAROUND: Bugfix for the original game data to get to room #27 via rooms #10 or #11
if ((roomNum == 10) || (roomNum == 11))
rec->roomIndex[26] = TO_LE_16(1);
}
@@ -1264,7 +1264,7 @@ void read_room_exit_hotspots_data(byte *&data, uint16 &totalSize) {
data = (byte *) malloc(MAX_DATA_SIZE);
RoomExitIndexedHotspotResource *rec = (RoomExitIndexedHotspotResource *) data;
-
+
uint16 dataStart = 0x2E57;
if (language == IT_ITA) dataStart = 0x2E66;
else if (language == FR_FRA) dataStart = 0x2e76;
@@ -1272,7 +1272,7 @@ void read_room_exit_hotspots_data(byte *&data, uint16 &totalSize) {
else if (language == ES_ESP) dataStart = 0x2e71;
else if (language != EN_ANY) errorExit("read_room_exit_hotspots_data: Unknown language");
lureExe.seek(dataSegment + dataStart);
-
+
lureExe.read(rec, sizeof(RoomExitIndexedHotspotResource));
while (FROM_LE_16(rec->roomNumber) != 0) {
++rec;
@@ -1292,7 +1292,7 @@ void save_fight_segment(byte *&data, uint16 &totalSize) {
else if (language == ES_ESP) fightSegment = 0x1c5b0;
else if (language != EN_ANY) errorExit("save_fight_segment: Unknown language");
lureExe.seek(fightSegment);
-
+
totalSize = FIGHT_SEGMENT_SIZE;
data = (byte *) malloc(totalSize);
lureExe.read(data, totalSize);
@@ -1300,11 +1300,11 @@ void save_fight_segment(byte *&data, uint16 &totalSize) {
#define NUM_TEXT_ENTRIES 56
const char *englishTextStrings[NUM_TEXT_ENTRIES] = {
- "Get", NULL, "Push", "Pull", "Operate", "Open", "Close", "Lock", "Unlock", "Use",
- "Give", "Talk to", "Tell", "Buy", "Look", "Look at", "Look through", "Ask", NULL,
+ "Get", NULL, "Push", "Pull", "Operate", "Open", "Close", "Lock", "Unlock", "Use",
+ "Give", "Talk to", "Tell", "Buy", "Look", "Look at", "Look through", "Ask", NULL,
"Drink", "Status", "Go to", "Return", "Bribe", "Examine",
- "Credits", "Restart game", "Save game", "Restore game", "Quit", "Fast Text\x8B",
- "Slow Text\x8B", "Sound on", "Sound off", "(nothing)", " for ", " to ", " on ",
+ "Credits", "Restart game", "Save game", "Restore game", "Quit", "Fast Text\x8B",
+ "Slow Text\x8B", "Sound on", "Sound off", "(nothing)", " for ", " to ", " on ",
"and then", "finish", "Are you sure (y/n)?",
"You are carrying ", "nothing", "You have ", "groat", "groats",
NULL, "the ", "a ", "a ", "an ", "an ", "an ", "an ", NULL, NULL
@@ -1315,9 +1315,9 @@ const char *italianTextStrings[NUM_TEXT_ENTRIES] = {
"Sblocca", "Usa", "Dai", "Parla con", "Ordina a", "Buy", "Guarda", "Osserva",
"Guarda tra", "Chiedi", NULL, "Bevi", "Stato", "Vai a", "Ritorna",
"Corrompi", "Esamina",
- "Inform", "Reavvia", "Salva gioco", "Ripristina", "Abbandona", "Testo lento\x8B",
- "Testo veloce\x8B", "Sonoro acceso", "Sonoro spento",
- "(niente)", " per ", " a ", " su ",
+ "Inform", "Reavvia", "Salva gioco", "Ripristina", "Abbandona", "Testo lento\x8B",
+ "Testo veloce\x8B", "Sonoro acceso", "Sonoro spento",
+ "(niente)", " per ", " a ", " su ",
"e poi", "finito", "Sei sicuro (s/n)?",
"Stai portando ", "niente", "e hai ", "soldi", "soldis",
NULL, "l' ", "la ", NULL, "le ", "i ", "il ", NULL, NULL, NULL
@@ -1330,7 +1330,7 @@ const char *frenchTextStrings[NUM_TEXT_ENTRIES] = {
"Prends", NULL, "Pousse", "Tire", "Actionne", "Ouvre", "Ferme", "Verrouille",
frenchUnlockStr, "Utilise", "Donne", "Parle \0x81", "Dis \x81", NULL,
"Regarde", "Observe", "Regarde par", "Demande \x81", NULL, "Bois", "Statut",
- "Va \x81", "Reviens", "Corromps", "Examine",
+ "Va \x81", "Reviens", "Corromps", "Examine",
frenchCreditsStr, "Recommencer", "Sauvegarder", "Restituer", "Quitter",
"Texte rapide\x8b", "Texte lent \x8b", "Avec son", "Sans son",
"(rien)", " avec ", " \x81 ", " sur ", "et puis", "fin",
@@ -1344,7 +1344,7 @@ const char *germanTextStrings[NUM_TEXT_ENTRIES] = {
"Sperre", "Steck Schl\x8cssel in", "Benutze", "Gib", "Sprich mit", "Befehl an",
NULL, "Betrachte", "Betrachte", "Schau durch", "Verlange", NULL, "Trink",
"Status", "Geh zu", "Zur\x8c" "ck", "Besteche", "Untersuche",
- "Mitwirkende", "Spiel neu starten", "Spiel sichern", "Gesichertes Spiel laden",
+ "Mitwirkende", "Spiel neu starten", "Spiel sichern", "Gesichertes Spiel laden",
"Abbrechen", "Schneller Text\x8b",
"Langsamer Text\x8b", "Sound an", "Sound aus", "(nichts)", " nach ", " an ", " f\x8cr ",
"und dann", "Schlu\x92", "Sicher (j/n)?",
@@ -1376,7 +1376,7 @@ void save_text_strings(byte *&data, uint16 &totalSize) {
// Calculate the total needed space
totalSize = sizeof(uint16);
for (index = 0; index < NUM_TEXT_ENTRIES; ++index) {
- if (textStrings[index] != NULL)
+ if (textStrings[index] != NULL)
totalSize += strlen(textStrings[index]);
++totalSize;
}
@@ -1404,7 +1404,7 @@ void save_sound_desc_data(byte *&data, uint16 &totalSize) {
else if (language == ES_ESP) dataStart = 0x5751;
else if (language != EN_ANY) errorExit("save_sound_desc_data: Unknown language");
lureExe.seek(dataSegment + dataStart);
-
+
totalSize = SOUND_DESCS_SIZE;
data = (byte *) malloc(totalSize);
lureExe.read(data, totalSize);
@@ -1416,33 +1416,33 @@ struct DecoderEntry {
};
const DecoderEntry englishDecoders[] = {
- {"00", ' '}, {"0100", 'e'}, {"0101", 'o'}, {"0110", 't'}, {"01110", 'a'},
- {"01111", 'n'}, {"1000", 's'}, {"1001", 'i'}, {"1010", 'r'}, {"10110", 'h'},
- {"101110", 'u'}, {"1011110", 'l'}, {"1011111", 'd'}, {"11000", 'y'},
- {"110010", 'g'}, {"110011", '\0'}, {"110100", 'w'}, {"110101", 'c'},
- {"110110", 'f'}, {"1101110", '.'}, {"1101111", 'm'}, {"111000", 'p'},
- {"111001", 'b'}, {"1110100", ','}, {"1110101", 'k'}, {"1110110", '\''},
- {"11101110", 'I'}, {"11101111", 'v'}, {"1111000", '!'}, {"1111001", '\xb4'},
- {"11110100", 'T'}, {"11110101", '\xb5'}, {"11110110", '?'}, {"111101110", '\xb2'},
- {"111101111", '\xb3'}, {"11111000", 'W'}, {"111110010", 'H'}, {"111110011", 'A'},
- {"111110100", '\xb1'}, {"111110101", 'S'}, {"111110110", 'Y'}, {"1111101110", 'G'},
- {"11111011110", 'M'}, {"11111011111", 'N'}, {"111111000", 'O'}, {"1111110010", 'E'},
- {"1111110011", 'L'}, {"1111110100", '-'}, {"1111110101", 'R'}, {"1111110110", 'B'},
- {"11111101110", 'D'}, {"11111101111", '\xa6'}, {"1111111000", 'C'},
- {"11111110010", 'x'}, {"11111110011", 'j'}, {"1111111010", '\xac'},
- {"11111110110", '\xa3'}, {"111111101110", 'P'}, {"111111101111", 'U'},
- {"11111111000", 'q'}, {"11111111001", '\xad'}, {"111111110100", 'F'},
- {"111111110101", '1'}, {"111111110110", '\xaf'}, {"1111111101110", ';'},
- {"1111111101111", 'z'}, {"111111111000", '\xa5'}, {"1111111110010", '2'},
- {"1111111110011", '\xb0'}, {"111111111010", 'K'}, {"1111111110110", '%'},
- {"11111111101110", '\xa2'}, {"11111111101111", '5'}, {"1111111111000", ':'},
- {"1111111111001", 'J'}, {"1111111111010", 'V'}, {"11111111110110", '6'},
- {"11111111110111", '3'}, {"1111111111100", '\xab'}, {"11111111111010", '\xae'},
- {"111111111110110", '0'}, {"111111111110111", '4'}, {"11111111111100", '7'},
- {"111111111111010", '9'}, {"111111111111011", '"'}, {"111111111111100", '8'},
- {"111111111111101", '\xa7'}, {"1111111111111100", '/'}, {"1111111111111101", 'Q'},
- {"11111111111111100", '\xa8'}, {"11111111111111101", '('}, {"111111111111111100", ')'},
- {"111111111111111101", '\x99'}, {"11111111111111111", '\xa9'},
+ {"00", ' '}, {"0100", 'e'}, {"0101", 'o'}, {"0110", 't'}, {"01110", 'a'},
+ {"01111", 'n'}, {"1000", 's'}, {"1001", 'i'}, {"1010", 'r'}, {"10110", 'h'},
+ {"101110", 'u'}, {"1011110", 'l'}, {"1011111", 'd'}, {"11000", 'y'},
+ {"110010", 'g'}, {"110011", '\0'}, {"110100", 'w'}, {"110101", 'c'},
+ {"110110", 'f'}, {"1101110", '.'}, {"1101111", 'm'}, {"111000", 'p'},
+ {"111001", 'b'}, {"1110100", ','}, {"1110101", 'k'}, {"1110110", '\''},
+ {"11101110", 'I'}, {"11101111", 'v'}, {"1111000", '!'}, {"1111001", '\xb4'},
+ {"11110100", 'T'}, {"11110101", '\xb5'}, {"11110110", '?'}, {"111101110", '\xb2'},
+ {"111101111", '\xb3'}, {"11111000", 'W'}, {"111110010", 'H'}, {"111110011", 'A'},
+ {"111110100", '\xb1'}, {"111110101", 'S'}, {"111110110", 'Y'}, {"1111101110", 'G'},
+ {"11111011110", 'M'}, {"11111011111", 'N'}, {"111111000", 'O'}, {"1111110010", 'E'},
+ {"1111110011", 'L'}, {"1111110100", '-'}, {"1111110101", 'R'}, {"1111110110", 'B'},
+ {"11111101110", 'D'}, {"11111101111", '\xa6'}, {"1111111000", 'C'},
+ {"11111110010", 'x'}, {"11111110011", 'j'}, {"1111111010", '\xac'},
+ {"11111110110", '\xa3'}, {"111111101110", 'P'}, {"111111101111", 'U'},
+ {"11111111000", 'q'}, {"11111111001", '\xad'}, {"111111110100", 'F'},
+ {"111111110101", '1'}, {"111111110110", '\xaf'}, {"1111111101110", ';'},
+ {"1111111101111", 'z'}, {"111111111000", '\xa5'}, {"1111111110010", '2'},
+ {"1111111110011", '\xb0'}, {"111111111010", 'K'}, {"1111111110110", '%'},
+ {"11111111101110", '\xa2'}, {"11111111101111", '5'}, {"1111111111000", ':'},
+ {"1111111111001", 'J'}, {"1111111111010", 'V'}, {"11111111110110", '6'},
+ {"11111111110111", '3'}, {"1111111111100", '\xab'}, {"11111111111010", '\xae'},
+ {"111111111110110", '0'}, {"111111111110111", '4'}, {"11111111111100", '7'},
+ {"111111111111010", '9'}, {"111111111111011", '"'}, {"111111111111100", '8'},
+ {"111111111111101", '\xa7'}, {"1111111111111100", '/'}, {"1111111111111101", 'Q'},
+ {"11111111111111100", '\xa8'}, {"11111111111111101", '('}, {"111111111111111100", ')'},
+ {"111111111111111101", '\x99'}, {"11111111111111111", '\xa9'},
{NULL, '\0'}
};
@@ -1481,8 +1481,8 @@ const DecoderEntry italianDecoders[] = {
const DecoderEntry frenchDecoders[] = {
{"00", (char) 0x20}, {"0100", (char) 0x65}, {"0101", (char) 0x73}, {"0110", (char) 0x61}, {"01110", (char) 0x69},
- {"011110", (char) 0x6E}, {"011111", (char) 0x72}, {"1000", (char) 0x6F}, {"10010", (char) 0x74},
- {"100110", (char) 0x75}, {"100111", (char) 0x70}, {"10100", (char) 0x6C}, {"10101", (char) 0x6D},
+ {"011110", (char) 0x6E}, {"011111", (char) 0x72}, {"1000", (char) 0x6F}, {"10010", (char) 0x74},
+ {"100110", (char) 0x75}, {"100111", (char) 0x70}, {"10100", (char) 0x6C}, {"10101", (char) 0x6D},
{"101100", (char) 0x63}, {"101101", (char) 0x76}, {"101110", (char) 0x00}, {"1011110", (char) 0x2E},
{"1011111", (char) 0x7F}, {"110000", (char) 0xAA}, {"110001", (char) 0x27}, {"110010", (char) 0x64},
{"1100110", (char) 0xB8}, {"1100111", (char) 0x2C}, {"110100", (char) 0x62}, {"1101010", (char) 0x68},
@@ -1526,7 +1526,7 @@ const DecoderEntry frenchDecoders[] = {
const DecoderEntry germanDecoders[] = {
{"000", (char) 0x20}, {"001", (char) 0x65}, {"0100", (char) 0x6E}, {"0101", (char) 0x61}, {"0110", (char) 0x72},
- {"01110", (char) 0x69}, {"011110", (char) 0x74}, {"011111", (char) 0x73}, {"10000", (char) 0x68},
+ {"01110", (char) 0x69}, {"011110", (char) 0x74}, {"011111", (char) 0x73}, {"10000", (char) 0x68},
{"10001", (char) 0x6C}, {"10010", (char) 0x75}, {"100110", (char) 0x6D}, {"100111", (char) 0xB0},
{"10100", (char) 0x67}, {"101010", (char) 0x00}, {"101011", (char) 0x62}, {"101100", (char) 0x63},
{"101101", (char) 0x2C}, {"101110", (char) 0x6F}, {"1011110", (char) 0xAA}, {"1011111", (char) 0x77},
@@ -1569,36 +1569,36 @@ const DecoderEntry germanDecoders[] = {
};
const DecoderEntry spanishDecoders[] = {
- {"00", (char) 0x20}, {"010", (char) 0x61}, {"0110", (char) 0x6F}, {"01110", (char) 0x65},
- {"01111", (char) 0x72}, {"1000", (char) 0x73}, {"1001", (char) 0x6E}, {"10100", (char) 0x69},
- {"10101", (char) 0x75}, {"10110", (char) 0x63}, {"101110", (char) 0x74}, {"1011110", (char) 0x6C},
- {"1011111", (char) 0x64}, {"11000", (char) 0x70}, {"110010", (char) 0x2E}, {"110011", (char) 0x6D},
- {"110100", (char) 0x00}, {"110101", (char) 0xB3}, {"1101100", (char) 0x62}, {"1101101", (char) 0x2C},
- {"1101110", (char) 0x68}, {"11011110", (char) 0x67}, {"11011111", (char) 0xB1}, {"1110000", (char) 0x76},
- {"1110001", (char) 0xB5}, {"1110010", (char) 0x79}, {"11100110", (char) 0xAB}, {"11100111", (char) 0xB4},
- {"1110100", (char) 0x97}, {"11101010", (char) 0xB2}, {"11101011", (char) 0x98}, {"11101100", (char) 0x45},
- {"11101101", (char) 0x66}, {"11101110", (char) 0x95}, {"111011110", (char) 0x21}, {"111011111", (char) 0x6A},
- {"11110000", (char) 0x4C}, {"11110001", (char) 0x4E}, {"11110010", (char) 0x7F}, {"111100110", (char) 0x96},
- {"111100111", (char) 0x3F}, {"11110100", (char) 0xAC}, {"11110101", (char) 0x94}, {"11110110", (char) 0x7A},
- {"111101110", (char) 0x41}, {"1111011110", (char) 0x53}, {"1111011111", (char) 0x71}, {"11111000", (char) 0x54},
- {"111110010", (char) 0x93}, {"1111100110", (char) 0xAF}, {"1111100111", (char) 0x43}, {"111110100", (char) 0x50},
+ {"00", (char) 0x20}, {"010", (char) 0x61}, {"0110", (char) 0x6F}, {"01110", (char) 0x65},
+ {"01111", (char) 0x72}, {"1000", (char) 0x73}, {"1001", (char) 0x6E}, {"10100", (char) 0x69},
+ {"10101", (char) 0x75}, {"10110", (char) 0x63}, {"101110", (char) 0x74}, {"1011110", (char) 0x6C},
+ {"1011111", (char) 0x64}, {"11000", (char) 0x70}, {"110010", (char) 0x2E}, {"110011", (char) 0x6D},
+ {"110100", (char) 0x00}, {"110101", (char) 0xB3}, {"1101100", (char) 0x62}, {"1101101", (char) 0x2C},
+ {"1101110", (char) 0x68}, {"11011110", (char) 0x67}, {"11011111", (char) 0xB1}, {"1110000", (char) 0x76},
+ {"1110001", (char) 0xB5}, {"1110010", (char) 0x79}, {"11100110", (char) 0xAB}, {"11100111", (char) 0xB4},
+ {"1110100", (char) 0x97}, {"11101010", (char) 0xB2}, {"11101011", (char) 0x98}, {"11101100", (char) 0x45},
+ {"11101101", (char) 0x66}, {"11101110", (char) 0x95}, {"111011110", (char) 0x21}, {"111011111", (char) 0x6A},
+ {"11110000", (char) 0x4C}, {"11110001", (char) 0x4E}, {"11110010", (char) 0x7F}, {"111100110", (char) 0x96},
+ {"111100111", (char) 0x3F}, {"11110100", (char) 0xAC}, {"11110101", (char) 0x94}, {"11110110", (char) 0x7A},
+ {"111101110", (char) 0x41}, {"1111011110", (char) 0x53}, {"1111011111", (char) 0x71}, {"11111000", (char) 0x54},
+ {"111110010", (char) 0x93}, {"1111100110", (char) 0xAF}, {"1111100111", (char) 0x43}, {"111110100", (char) 0x50},
{"111110101", (char) 0x4D}, {"111110110", (char) 0x44}, {"1111101110", (char) 0xAE}, {"11111011110", (char) 0xAD},
- {"11111011111", (char) 0xB0}, {"111111000", (char) 0x48}, {"1111110010", (char) 0x51}, {"1111110011", (char) 0x55},
- {"1111110100", (char) 0x4F}, {"1111110101", (char) 0x47}, {"1111110110", (char) 0x99},
- {"11111101110", (char) 0xA8}, {"11111101111", (char) 0x22}, {"1111111000", (char) 0xA9},
- {"11111110010", (char) 0xA6}, {"11111110011", (char) 0x52}, {"1111111010", (char) 0x59},
- {"11111110110", (char) 0xA3}, {"111111101110", (char) 0x78}, {"111111101111", (char) 0x56},
- {"11111111000", (char) 0x77}, {"11111111001", (char) 0x42}, {"111111110100", (char) 0x6B},
- {"111111110101", (char) 0x49}, {"111111110110", (char) 0x31}, {"1111111101110", (char) 0xAA},
- {"1111111101111", (char) 0x2D}, {"111111111000", (char) 0x46}, {"111111111001", (char) 0xA5},
- {"1111111110100", (char) 0x32}, {"1111111110101", (char) 0x3B}, {"1111111110110", (char) 0xA7},
- {"11111111101110", (char) 0x35}, {"11111111101111", (char) 0x25}, {"1111111111000", (char) 0x3A},
- {"1111111111001", (char) 0xA2}, {"1111111111010", (char) 0x57}, {"11111111110110", (char) 0x36},
- {"11111111110111", (char) 0x33}, {"1111111111100", (char) 0x4A}, {"11111111111010", (char) 0x30},
- {"11111111111011", (char) 0x34}, {"11111111111100", (char) 0x37}, {"111111111111010", (char) 0x39},
- {"111111111111011", (char) 0x38}, {"111111111111100", (char) 0xA4}, {"111111111111101", (char) 0x2F},
- {"1111111111111100", (char) 0x5A}, {"1111111111111101", (char) 0x8C}, {"11111111111111100", (char) 0x28},
- {"11111111111111101", (char) 0x29}, {"11111111111111110", (char) 0x4B}, {"111111111111111110", (char) 0x58},
+ {"11111011111", (char) 0xB0}, {"111111000", (char) 0x48}, {"1111110010", (char) 0x51}, {"1111110011", (char) 0x55},
+ {"1111110100", (char) 0x4F}, {"1111110101", (char) 0x47}, {"1111110110", (char) 0x99},
+ {"11111101110", (char) 0xA8}, {"11111101111", (char) 0x22}, {"1111111000", (char) 0xA9},
+ {"11111110010", (char) 0xA6}, {"11111110011", (char) 0x52}, {"1111111010", (char) 0x59},
+ {"11111110110", (char) 0xA3}, {"111111101110", (char) 0x78}, {"111111101111", (char) 0x56},
+ {"11111111000", (char) 0x77}, {"11111111001", (char) 0x42}, {"111111110100", (char) 0x6B},
+ {"111111110101", (char) 0x49}, {"111111110110", (char) 0x31}, {"1111111101110", (char) 0xAA},
+ {"1111111101111", (char) 0x2D}, {"111111111000", (char) 0x46}, {"111111111001", (char) 0xA5},
+ {"1111111110100", (char) 0x32}, {"1111111110101", (char) 0x3B}, {"1111111110110", (char) 0xA7},
+ {"11111111101110", (char) 0x35}, {"11111111101111", (char) 0x25}, {"1111111111000", (char) 0x3A},
+ {"1111111111001", (char) 0xA2}, {"1111111111010", (char) 0x57}, {"11111111110110", (char) 0x36},
+ {"11111111110111", (char) 0x33}, {"1111111111100", (char) 0x4A}, {"11111111111010", (char) 0x30},
+ {"11111111111011", (char) 0x34}, {"11111111111100", (char) 0x37}, {"111111111111010", (char) 0x39},
+ {"111111111111011", (char) 0x38}, {"111111111111100", (char) 0xA4}, {"111111111111101", (char) 0x2F},
+ {"1111111111111100", (char) 0x5A}, {"1111111111111101", (char) 0x8C}, {"11111111111111100", (char) 0x28},
+ {"11111111111111101", (char) 0x29}, {"11111111111111110", (char) 0x4B}, {"111111111111111110", (char) 0x58},
{"111111111111111111", (char) 0x91},
{NULL, '\0'}
};
@@ -1708,7 +1708,7 @@ void getEntry(uint8 entryIndex, uint16 &resourceId, byte *&data, uint16 &size) {
break;
case 14:
- // Get the messages segment
+ // Get the messages segment
read_messages_segment(data, size);
break;
@@ -1761,7 +1761,7 @@ void getEntry(uint8 entryIndex, uint16 &resourceId, byte *&data, uint16 &size) {
// Save the decoder sequence list
save_string_decoder_data(data, size);
break;
-
+
default:
data = NULL;
size = 0;
@@ -1827,7 +1827,7 @@ void createFile(const char *outFilename) {
// Get next data entry
if (resourceFlag)
// Get resource details
- getEntry(resIndex, resourceId, resourceData, resourceSize);
+ getEntry(resIndex, resourceId, resourceData, resourceSize);
// Write out the next header entry
outputFile.seek(outputStart + (resIndex + 1) * 8);
@@ -1854,7 +1854,7 @@ void createFile(const char *outFilename) {
// Write out enough bytes to move to the next 32 byte boundary
numBytes = 0x20 * ((startOffset + 0x1f) / 0x20) - startOffset;
- if (numBytes != 0)
+ if (numBytes != 0)
{
outputFile.write(tempBuffer, numBytes);
startOffset += numBytes;
@@ -1869,13 +1869,13 @@ void createFile(const char *outFilename) {
// validate_executable
// Validates that the correct executable is being used to generate the
// resource file. Eventually the resource file creator will need to work
-// with the other language executables, but for now just make
+// with the other language executables, but for now just make
bool validate_executable() {
uint32 sumTotal = 0;
byte buffer[NUM_BYTES_VALIDATE];
lureExe.read(buffer, NUM_BYTES_VALIDATE);
- for (int ctr = 0; ctr < NUM_BYTES_VALIDATE; ++ctr)
+ for (int ctr = 0; ctr < NUM_BYTES_VALIDATE; ++ctr)
sumTotal += buffer[ctr];
if (sumTotal == ENGLISH_FILE_CHECKSUM) {
@@ -1927,11 +1927,11 @@ int main(int argc, char *argv[]) {
openOutputFile(argv[1]);
for (int argi = 2; argi < argc; ++argi) {
- if (!lureExe.open(argv[argi]))
+ if (!lureExe.open(argv[argi]))
printf("Could not open file: %s\n", argv[argi]);
else {
- if (validate_executable())
- createFile(outFilename);
+ if (validate_executable())
+ createFile(outFilename);
lureExe.close();
}
}
diff --git a/tools/create_lure/create_lure_dat.h b/tools/create_lure/create_lure_dat.h
index 1677c10b97..d9903da85d 100644
--- a/tools/create_lure/create_lure_dat.h
+++ b/tools/create_lure/create_lure_dat.h
@@ -59,7 +59,7 @@
#define MAX_HOTSPOTS 0x100
#define MAX_DATA_SIZE 0x4000
-#define PATHFIND_SIZE (120 * ROOM_NUM_ENTRIES)
+#define PATHFIND_SIZE (120 * ROOM_NUM_ENTRIES)
#define EXIT_COORDINATES_OFFSET 0x1929
#define EXIT_COORDINATES_NUM_ROOMS 49
@@ -344,7 +344,7 @@ struct RoomExitCoordinateEntryOutputResource {
};
-enum CurrentAction {NO_ACTION, START_WALKING, DISPATCH_ACTION, EXEC_HOTSPOT_SCRIPT,
+enum CurrentAction {NO_ACTION, START_WALKING, DISPATCH_ACTION, EXEC_HOTSPOT_SCRIPT,
PROCESSING_PATH, WALKING};
extern void read_action_sequence(byte *&data, uint16 &totalSize);
@@ -381,7 +381,7 @@ public:
void write(const void *buffer, int len) {
fwrite(buffer, 1, len, f);
}
- byte readByte() {
+ byte readByte() {
byte v;
read(&v, sizeof(byte));
return v;
@@ -396,14 +396,14 @@ public:
read(&v, sizeof(uint32));
return FROM_LE_32(v);
}
- void writeByte(byte v) {
+ void writeByte(byte v) {
write(&v, sizeof(byte));
}
- void writeWord(uint16 v) {
+ void writeWord(uint16 v) {
uint16 vTemp = TO_LE_16(v);
write(&vTemp, sizeof(uint16));
}
- void writeLong(uint32 v) {
+ void writeLong(uint32 v) {
uint32 vTemp = TO_LE_32(v);
write(&vTemp, sizeof(uint32));
}
diff --git a/tools/create_lure/process_actions.cpp b/tools/create_lure/process_actions.cpp
index b28dc46919..81db0de022 100644
--- a/tools/create_lure/process_actions.cpp
+++ b/tools/create_lure/process_actions.cpp
@@ -34,10 +34,10 @@ enum Action {
UNLOCK = 9, USE = 10, GIVE = 11, TALK_TO = 12, TELL = 13, BUY = 14,
LOOK = 15, LOOK_AT = 16, LOOK_THROUGH = 17, ASK = 18, DRINK = 20,
STATUS = 21, GO_TO = 22, RETURN = 23, BRIBE = 24, EXAMINE = 25,
- NPC_SET_ROOM_AND_BLOCKED_OFFSET = 28, NPC_HEY_SIR = 29, NPC_EXEC_SCRIPT = 30,
- NPC_RESET_PAUSED_LIST = 31, NPC_SET_RAND_DEST = 32, NPC_WALKING_CHECK = 33,
- NPC_SET_SUPPORT_OFFSET = 34, NPC_SUPPORT_OFFSET_COND = 35,
- NPC_DISPATCH_ACTION = 36, NPC_TALK_NPC_TO_NPC = 37, NPC_PAUSE = 38,
+ NPC_SET_ROOM_AND_BLOCKED_OFFSET = 28, NPC_HEY_SIR = 29, NPC_EXEC_SCRIPT = 30,
+ NPC_RESET_PAUSED_LIST = 31, NPC_SET_RAND_DEST = 32, NPC_WALKING_CHECK = 33,
+ NPC_SET_SUPPORT_OFFSET = 34, NPC_SUPPORT_OFFSET_COND = 35,
+ NPC_DISPATCH_ACTION = 36, NPC_TALK_NPC_TO_NPC = 37, NPC_PAUSE = 38,
NPC_START_TALKING = 39, NPC_JUMP_ADDRESS = 40,
NONE = 0
};
@@ -50,7 +50,7 @@ struct CurrentActionOutput {
uint16 usedId;
};
-int numParams[NPC_JUMP_ADDRESS+1] = {0,
+int numParams[NPC_JUMP_ADDRESS+1] = {0,
1, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 0, 1,
0, 1, 1, 1, 1, 0, 0, 2, 1, 1, 0, 0, 1, 1, 2, 2, 5, 2, 2, 1};
@@ -77,7 +77,7 @@ JumpOffsetsRecord jumpOffsets[] = {
struct SupportStructure {
uint16 offset;
int numInstructions;
- uint16 instructionOffsets[MAX_INSTRUCTION_ENTRIES];
+ uint16 instructionOffsets[MAX_INSTRUCTION_ENTRIES];
uint16 resourceOffset;
};
@@ -101,7 +101,7 @@ uint16 get_sequence_index(uint16 offset, int supportIndex) {
SupportStructure &rec = supportList[index];
if ((rec.numInstructions > 0) &&
- (offset >= rec.instructionOffsets[0]) &&
+ (offset >= rec.instructionOffsets[0]) &&
(offset <= rec.instructionOffsets[rec.numInstructions - 1])) {
// Scan through the entry's insruction list
for (int iIndex = 0; iIndex < rec.numInstructions; ++iIndex) {
@@ -236,11 +236,11 @@ uint16 process_action_sequence_entry(int supportIndex, byte *data, uint16 remain
// Special check for forward references - it's considered to be in
// the same block if it's forward within 100h blocks
- if ((params[paramIndex] > offset) &&
+ if ((params[paramIndex] > offset) &&
(params[paramIndex] < offset + FORWARD_JUMP_ALLOWANCE) &&
(params[paramIndex] > maxOffset)) {
maxOffset = params[paramIndex];
- }
+ }
break;
case NPC_JUMP_ADDRESS:
@@ -250,9 +250,9 @@ uint16 process_action_sequence_entry(int supportIndex, byte *data, uint16 remain
index = 0;
while ((index < NUM_JUMP_OFFSETS) && (jmpOffset->jumpOffsets[index] != params[0]))
++index;
-
+
if (index != NUM_JUMP_OFFSETS)
- // Replace code offset with an index
+ // Replace code offset with an index
params[0] = index;
else {
printf("\nEncountered unrecognised NPC code jump point: %xh\n", params[0]);
@@ -261,7 +261,7 @@ uint16 process_action_sequence_entry(int supportIndex, byte *data, uint16 remain
break;
case NPC_HEY_SIR:
- // The 'Hey Sir' opcode causes the NPC to request your attention, and sets the active talk
+ // The 'Hey Sir' opcode causes the NPC to request your attention, and sets the active talk
// record to a designated offset. So any offset occurances need to be saved so that it can
// be included in the resource for talk records
add_talk_offset(params[0]);
@@ -280,7 +280,7 @@ uint16 process_action_sequence_entry(int supportIndex, byte *data, uint16 remain
//printf("\n");
// Increase size
- totalSize += (numParams[actionNum] + 1) * sizeof(uint16);
+ totalSize += (numParams[actionNum] + 1) * sizeof(uint16);
offset = startOffset + totalSize;
remainingSize -= (numParams[actionNum] + 1) * sizeof(uint16);
}
@@ -292,19 +292,19 @@ uint16 process_action_sequence_entry(int supportIndex, byte *data, uint16 remain
// handle post-processing of the symbol list
for (int symbolCtr = 0; symbolCtr < numSymbols; ++symbolCtr) {
- if (READ_LE_UINT16(symbolTable[symbolCtr].p) == 0)
+ if (READ_LE_UINT16(symbolTable[symbolCtr].p) == 0)
// No Id special constant
WRITE_LE_UINT16(symbolTable[symbolCtr].p, 0xffff);
else {
// Handle resolving the constant
- index = get_sequence_index(READ_LE_UINT16(symbolTable[symbolCtr].p),
+ index = get_sequence_index(READ_LE_UINT16(symbolTable[symbolCtr].p),
symbolTable[symbolCtr].globalNeeded ? -1 : supportIndex);
//printf("Symbol %xh => %xh\n", *symbolTable[symbolCtr].p, index);
if (index != 0xffff) {
- // Jump found - so replace symbol entry with it
+ // Jump found - so replace symbol entry with it
WRITE_LE_UINT16(symbolTable[symbolCtr].p, index);
} else {
- printf("Sequence contained unknown offset %xh\n",
+ printf("Sequence contained unknown offset %xh\n",
READ_LE_UINT16(symbolTable[symbolCtr].p));
exit(1);
}
@@ -328,7 +328,7 @@ void process_entry(uint16 offset, byte *data, uint16 &totalSize) {
}
//printf("process_entry index=%d, offset=%xh\n", numSupportEntries, offset);
- totalSize += process_action_sequence_entry(numSupportEntries - 1,
+ totalSize += process_action_sequence_entry(numSupportEntries - 1,
data + totalSize, MAX_DATA_SIZE - totalSize);
}
}
@@ -344,7 +344,7 @@ struct RoomRandomActionSet {
RoomRandomActionEntry *entries;
};
-void read_action_sequence(byte *&data, uint16 &totalSize)
+void read_action_sequence(byte *&data, uint16 &totalSize)
{
uint16 hotspotIndex;
HotspotHeaderEntry entryHeader;
@@ -364,7 +364,7 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
/* Process the list of random actions that your follower can do in each room */
RoomRandomActionSet *randomActions = new RoomRandomActionSet[RANDOM_ROOM_NUM_ENTRIES];
-
+
// Get a list of the offsets for each room
uint16 raOffset = 0x4D10;
if (language == IT_ITA) raOffset = 0x4dc0;
@@ -399,11 +399,11 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
offset += 2;
uint16 firstCommand = lureExe.readWord();
- randomActions[roomIndex].entries[entryCtr].offset =
+ randomActions[roomIndex].entries[entryCtr].offset =
(firstCommand == 0xfffe) ? 0 : offset;
-
+
offset += sizeof(uint16);
- while (lureExe.readWord() != 0xffff)
+ while (lureExe.readWord() != 0xffff)
offset += sizeof(uint16);
offset += sizeof(uint16);
}
@@ -424,8 +424,8 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
process_entry(0x13c2, data, totalSize); // RETURN sequence
process_entry(0xbb95, data, totalSize); // Exit blocked sequence
process_entry(0x706c, data, totalSize); // Jump proc #2 - go to castle basement
- process_entry(0x728a, data, totalSize);
- process_entry(0x76ec, data, totalSize);
+ process_entry(0x728a, data, totalSize);
+ process_entry(0x76ec, data, totalSize);
process_entry(0x4ebb, data, totalSize); // Goewin as a follower in cave
process_entry(0x7D9D, data, totalSize); // Goewin standard handler
break;
@@ -453,9 +453,9 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
errorExit("read_action_sequence: Unknown language");
}
- // Process the script engine list
-
- for (index = 0; index < NUM_TABLED_ACTION_BLOCKS; ++index)
+ // Process the script engine list
+
+ for (index = 0; index < NUM_TABLED_ACTION_BLOCKS; ++index)
if (offsetList[index] != 0)
process_entry(offsetList[index], data, totalSize);
@@ -470,7 +470,7 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
hotspotIndex = 0;
for (;;) {
- lureExe.seek(dataSegment + hsOffset +
+ lureExe.seek(dataSegment + hsOffset +
hotspotIndex * sizeof(HotspotHeaderEntry));
lureExe.read(&entryHeader, sizeof(HotspotHeaderEntry));
if (FROM_LE_16(entryHeader.offset) == 0xffff) break;
@@ -479,7 +479,7 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
// Move to the action sequence area of the hotspot
lureExe.seek(dataSegment + entryHeader.offset + 0x63);
lureExe.read(&action, sizeof(CurrentActionInput));
- if (FROM_LE_16(action.action) == 2)
+ if (FROM_LE_16(action.action) == 2)
process_entry(FROM_LE_16(action.dataOffset), data, totalSize);
}
@@ -500,7 +500,7 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
// Output the list used in the script engine
pHeader = (uint16 *) data;
- for (index = 0; index < NUM_TABLED_ACTION_BLOCKS; ++index)
+ for (index = 0; index < NUM_TABLED_ACTION_BLOCKS; ++index)
if (offsetList[index] == 0)
*pHeader++ = 0;
else
@@ -535,7 +535,7 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
// Output the offsets of each action set
- for (index = 0; index < numSupportEntries; ++index)
+ for (index = 0; index < numSupportEntries; ++index)
*pHeader++ = TO_LE_16(supportList[index].resourceOffset);
*pHeader++ = TO_LE_16(0xffff);
@@ -546,4 +546,4 @@ void read_action_sequence(byte *&data, uint16 &totalSize)
delete randomActions[roomIndex].entries;
}
delete randomActions;
-}
+}
diff --git a/tools/credits.pl b/tools/credits.pl
index 19ee4d7979..48cd200667 100755
--- a/tools/credits.pl
+++ b/tools/credits.pl
@@ -58,7 +58,7 @@ if ($mode eq "TEXT") {
# Convert HTML entities to ASCII for the plain text mode
sub html_entities_to_ascii {
my $text = shift;
-
+
# For now we hardcode these mappings
# &aacute; -> a
# &eacute; -> e
@@ -82,7 +82,7 @@ sub html_entities_to_ascii {
$text =~ s/&ouml;/oe/g;
$text =~ s/&amp;/&/g;
-
+
return $text;
}
@@ -101,14 +101,14 @@ sub html_entities_to_cpp {
$text =~ s/&uuml;/\\374/g;
$text =~ s/&amp;/&/g;
-
+
return $text;
}
# Convert HTML entities to RTF codes
sub html_entities_to_rtf {
my $text = shift;
-
+
$text =~ s/&aacute;/\\'87/g;
$text =~ s/&eacute;/\\'8e/g;
$text =~ s/&oacute;/\\'97/g;
@@ -120,14 +120,14 @@ sub html_entities_to_rtf {
$text =~ s/&uuml;/\\'9f/g;
$text =~ s/&amp;/&/g;
-
+
return $text;
}
# Convert HTML entities to TeX codes
sub html_entities_to_tex {
my $text = shift;
-
+
$text =~ s/&aacute;/\\'a/g;
$text =~ s/&eacute;/\\'e/g;
$text =~ s/&oacute;/\\'o/g;
@@ -139,11 +139,11 @@ sub html_entities_to_tex {
$text =~ s/&uuml;/\\"u/g;
$text =~ s/&amp;/\\&/g;
-
+
return $text;
}
-#
+#
# Small reference of the RTF commands used here:
#
# \fs28 switches to 14 point font (28 = 2 * 14)
@@ -224,7 +224,7 @@ sub begin_section {
if ($section_level >= 2) {
$title .= ":"
}
-
+
print " " x $section_level . $title."\n";
if ($section_level eq 0) {
print " " x $section_level . "*" x (length $title)."\n";
@@ -251,7 +251,7 @@ sub begin_section {
} elsif ($section_level eq 1) {
print '\fs32 ';
}
-
+
# Insert an empty line before this section header, *unless*
# this is the very first section header in the file.
if ($section_level > 0 || @section_count[0] > 0) {
@@ -261,7 +261,7 @@ sub begin_section {
print '\f1\b0\fs24 \cf0 \\' . "\n";
} elsif ($mode eq "CPP") {
if ($section_level eq 0) {
- # TODO: Would be nice to have a 'fat' or 'large' mode for
+ # TODO: Would be nice to have a 'fat' or 'large' mode for
# headlines...
$title = html_entities_to_cpp($title);
print '"\\\\C\\\\c1""'.$title.'",' . "\n";
@@ -347,15 +347,15 @@ sub add_person {
my $nick = shift;
my $desc = shift;
my $tab;
-
+
if ($mode eq "TEXT") {
$name = $nick if $name eq "";
$name = html_entities_to_ascii($name);
$desc = html_entities_to_ascii($desc);
-
+
$tab = " " x ($section_level * 2 + 1);
printf $tab."%-".$max_name_width.".".$max_name_width."s", $name;
-
+
# Print desc wrapped
if (length $desc > 0) {
my $inner_indent = ($section_level * 2 + 1) + $max_name_width + 3;
@@ -418,7 +418,7 @@ sub add_person {
sub add_paragraph {
my $text = shift;
my $tab;
-
+
if ($mode eq "TEXT") {
$tab = " " x ($section_level * 2 + 1);
print wrap($tab, $tab, html_entities_to_ascii($text))."\n";
diff --git a/tools/md5table.c b/tools/md5table.c
index b57f39e7bd..342e60986c 100644
--- a/tools/md5table.c
+++ b/tools/md5table.c
@@ -152,7 +152,7 @@ static const char *c_footer =
static void parseEntry(Entry *entry, char *line) {
assert(entry);
assert(line);
-
+
/* Split at the tabs */
entry->md5 = strtok(line, "\t\n\r");
entry->size = strtok(NULL, "\t\n\r");
@@ -238,7 +238,7 @@ int main(int argc, char *argv[])
} else {
showhelp(argv[0]);
}
-
+
time(&theTime);
generationDate = strdup(asctime(gmtime(&theTime)));
@@ -260,7 +260,7 @@ int main(int argc, char *argv[])
parseEntry(&entry, line+1);
if (outputMode == kPHPOutput) {
fprintf(outFile, "\taddEntry(");
-
+
// Print the description string
fprintf(outFile, "\"");
if (entry.extra && strcmp(entry.extra, "-")) {
@@ -342,7 +342,7 @@ int main(int argc, char *argv[])
if (outputMode == kPHPOutput) {
if (gameid[0] != 0) // If there is an active section, close it now
fprintf(outFile, "endSection();\n");
-
+
fprintf(outFile, "?>\n");
}
@@ -365,7 +365,7 @@ int main(int argc, char *argv[])
/* Finally, print the footer */
fprintf(outFile, c_footer);
}
-
+
free(entriesBuffer);
return 0;
diff --git a/tools/module.mk b/tools/module.mk
index cb91912b7f..97cc5d0b9a 100644
--- a/tools/module.mk
+++ b/tools/module.mk
@@ -57,7 +57,7 @@ md5scumm: tools/md5table$(EXEEXT)
#
-# Rules which automatically and implicitly rebuild the credits and
+# Rules which automatically and implicitly rebuild the credits and
# MD5 tables when needed.
# These are currently disabled, because if the input data changes, then
# the generated files should be checked in, too. Otherwise, we'd reduce
diff --git a/tools/skycpt/KmpSearch.cpp b/tools/skycpt/KmpSearch.cpp
index 93318de15e..c70a0a77d8 100644
--- a/tools/skycpt/KmpSearch.cpp
+++ b/tools/skycpt/KmpSearch.cpp
@@ -41,11 +41,11 @@ __declspec(naked) void __fastcall KmpSearch::init(const char *subStr) {
lea edi, [ecx + KmpSearch::_subStr] // this + 0x100
lea ebx, [ecx + KmpSearch::_retarget] // this
lea ebp, [ecx + 1]
-
+
mov byte ptr [ebx], -1
xor eax, eax
-
+
loopStart:
shr ecx, 8
test al, 3
@@ -107,7 +107,7 @@ __declspec(naked) char * __fastcall KmpSearch::search(const char *str) {
jz short endOfString // goto endOfString
xor edx, edx // index
-
+
mov cl, 3
searchLoop:
shr eax, 8
@@ -117,7 +117,7 @@ __declspec(naked) char * __fastcall KmpSearch::search(const char *str) {
lodsd
xor cl, cl
skipRead:
-
+
test al, al
jz short endOfString
diff --git a/tools/skycpt/ReadMe.txt b/tools/skycpt/ReadMe.txt
index f66c4f9f4f..396f9c3080 100644
--- a/tools/skycpt/ReadMe.txt
+++ b/tools/skycpt/ReadMe.txt
@@ -44,7 +44,7 @@ If you still want to waste your time by creating this file:
9) Rename this file to SKY.CPT.
10) DELETE IT BECAUSE IT'S PROBABLY BROKEN, NOT WORTH BOTHERING WITH ANYWAYS
AND DOWNLOAD THE SKY.CPT FILE FROM THE URL ABOVE!!
-
+
Oh, I almost forgot.
The program only works on little endian systems and probably isn't alignment safe either.
It may also leak memory or accidentially reformat your harddisk. Who knows.
diff --git a/tools/skycpt/cptcompiler.cpp b/tools/skycpt/cptcompiler.cpp
index 326390ce8d..0572bc1537 100644
--- a/tools/skycpt/cptcompiler.cpp
+++ b/tools/skycpt/cptcompiler.cpp
@@ -244,7 +244,7 @@ void processSymlinks(FILE *inf, CptObj *destArr, uint16 *baseLists) {
assertEmpty(from);
dlinkNames[dlinkCount] = (char*)malloc(strlen(cptName) + 1);
strcpy(dlinkNames[dlinkCount], cptName);
-
+
dofgets(line, 1024, inf);
assert((line[0] == '\t') && (line[1] == '\t') && (line[2] == '-') && (line[3] == '>'));
char *stopCh;
@@ -256,7 +256,7 @@ void processSymlinks(FILE *inf, CptObj *destArr, uint16 *baseLists) {
dlinks[dlinkCount * 2 + 1] = destId;
dlinkCount++;
-
+
dofgets(line, 1024, inf);
assert(isEndOfObject(line, "SYMLINK", fromId));
} else
@@ -303,7 +303,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
if (resCpts[id].data || resCpts[id].dbgName || resCpts[id].len)
dataListLen[cnt] = elemCnt + 1;
}
-
+
// write the header
uint32 rev = 0;
fwrite(&rev, 2, 1, debOutf);
@@ -432,7 +432,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
pos++;
diff[diffDest++] = (uint16)strtoul(pos, &pos, 16);
}
- assert(diff[diffDest - 1] == 0xFFFF);
+ assert(diff[diffDest - 1] == 0xFFFF);
diffNo++;
}
}
@@ -457,7 +457,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
else {
saveIds[numIds] = resId;
numIds++;
- }
+ }
}
printf("%d saveIds\n", numIds);
fwrite(&numIds, 2, 1, debOutf);
@@ -481,7 +481,7 @@ void doCompile(FILE *inf, FILE *debOutf, FILE *resOutf, TextFile *cptDef, FILE *
printf("File %s not found\n", inName);
}
}
-
+
if (filesExist) {
FILE *res288 = fopen("RESET.288", "rb");
fseek(res288, 0, SEEK_END);
diff --git a/tools/skycpt/idFinder.cpp b/tools/skycpt/idFinder.cpp
index 70452363e1..e97dd7d6fe 100644
--- a/tools/skycpt/idFinder.cpp
+++ b/tools/skycpt/idFinder.cpp
@@ -35,7 +35,7 @@ uint16 findCptId(char *name, TextFile *cptFile) {
cLine = cptFile->findLine(kmp, cLine);
if (cLine >= 0) {
char *line = cptFile->giveLine(cLine);
- if ((strncmp(line, "COMPACT::", 9) == 0) ||
+ if ((strncmp(line, "COMPACT::", 9) == 0) ||
(strncmp(line, "SCRATCH::", 9) == 0) ||
(strncmp(line, "GET_TOS::", 9) == 0)) {
char *stopCh;
diff --git a/tools/update-version.pl b/tools/update-version.pl
index b3d5a72b69..f1563282e5 100755
--- a/tools/update-version.pl
+++ b/tools/update-version.pl
@@ -61,14 +61,14 @@ foreach my $file (@subs_files) {
print "Processing $file...\n";
open(INPUT, "< $file.in") or die "Can't open '$file.in' for reading: $!\n";
open(OUTPUT, "> $file") or die "Can't open '$file' for writing: $!\n";
-
+
while (<INPUT>) {
while (my ($key, $value) = each(%subs)) {
s/\@$key\@/$value/;
}
print OUTPUT;
}
-
+
close(INPUT);
close(OUTPUT);
}